Esempio n. 1
0
        public virtual void Visit(RSRuleData inRuleData, TableLineRef inSourceRef)
        {
            if (inRuleData == null)
            {
                return;
            }

            inSourceRef = inSourceRef.WithRule(inRuleData.Id).CombineEnabled(inRuleData.Enabled);

            if (inRuleData.Conditions != null)
            {
                for (int i = 0; i < inRuleData.Conditions.Length; ++i)
                {
                    Visit(inRuleData.Conditions[i], inSourceRef.WithCondition(i));
                }
            }

            if (inRuleData.Actions != null)
            {
                for (int i = 0; i < inRuleData.Actions.Length; ++i)
                {
                    Visit(inRuleData.Actions[i], inSourceRef.WithAction(i));
                }
            }
        }
Esempio n. 2
0
            public override void Visit(EntityScopeData inScope, TableLineRef inSourceRef)
            {
                inSourceRef = inSourceRef.WithDescriptor("EntityScopeData");

                switch (inScope.Type)
                {
                case EntityScopeType.ObjectById:
                {
                    if (inScope.IdArg == m_EntityId)
                    {
                        AddRef(inSourceRef);
                    }
                    break;
                }

                case EntityScopeType.Invalid:
                {
                    if (m_EntityId == RSEntityId.Invalid)
                    {
                        AddRef(inSourceRef);
                    }
                    break;
                }

                case EntityScopeType.Null:
                {
                    if (m_EntityId == RSEntityId.Null)
                    {
                        AddRef(inSourceRef);
                    }
                    break;
                }
                }
            }
Esempio n. 3
0
            public override void Visit(EntityScopeData inScope, TableLineRef inSourceRef)
            {
                base.Visit(inScope, inSourceRef);

                switch (inScope.Type)
                {
                case EntityScopeType.ObjectsWithName:
                {
                    if (Match(inScope.SearchArg))
                    {
                        AddRef(inSourceRef, "Entity Name Search: " + inScope.SearchArg);
                    }
                    break;
                }

                case EntityScopeType.ObjectsWithPrefab:
                {
                    if (Match(inScope.SearchArg))
                    {
                        AddRef(inSourceRef, "Entity Prefab Name Search " + inScope.SearchArg);
                    }
                    break;
                }
                }

                if (Match(inScope.LinksArg))
                {
                    AddRef(inSourceRef, "Entity Link: " + inScope.LinksArg);
                }
            }
Esempio n. 4
0
 public virtual void Visit(RSValue inValue, TableLineRef inSourceRef)
 {
     if (inValue.GetInnerType() == RSValue.InnerType.EntityScope)
     {
         Visit(inValue.AsEntity, inSourceRef);
     }
 }
Esempio n. 5
0
 protected void AddRef(TableLineRef inRef)
 {
     if (!m_CollectedRefs.Contains(inRef))
     {
         m_CollectedRefs.Add(inRef);
     }
 }
Esempio n. 6
0
        public virtual void Visit(IRSRuleTableSource inRuleTableSource)
        {
            if (inRuleTableSource == null)
            {
                return;
            }

            Visit(inRuleTableSource.TableData, TableLineRef.FromTable(inRuleTableSource));
        }
Esempio n. 7
0
            public override void Visit(RSRuleTableData inRuleTableData, TableLineRef inSourceRef)
            {
                base.Visit(inRuleTableData, inSourceRef);

                if (Match(inRuleTableData?.Name))
                {
                    AddRef(inSourceRef, "Rule Table Name: " + inRuleTableData.Name);
                }
            }
Esempio n. 8
0
        public virtual void Visit(RSConditionData inConditionData, TableLineRef inSourceRef)
        {
            if (inConditionData == null)
            {
                return;
            }

            inSourceRef = inSourceRef.CombineEnabled(inConditionData.Enabled);

            Visit(inConditionData.Query, inSourceRef);
            Visit(inConditionData.Target, inSourceRef);
        }
Esempio n. 9
0
            public override void Visit(RSRuleData inRuleData, TableLineRef inSourceRef)
            {
                base.Visit(inRuleData, inSourceRef);

                if (inRuleData != null)
                {
                    inSourceRef = inSourceRef.WithRule(inRuleData.Id).CombineEnabled(inRuleData.Enabled);

                    if (inRuleData.TriggerId == m_TriggerId)
                    {
                        AddRef(inSourceRef, "Rule Trigger");
                    }
                }
            }
Esempio n. 10
0
        public virtual void Visit(RSRuleTableData inRuleTableData, TableLineRef inSourceRef)
        {
            if (inRuleTableData == null)
            {
                return;
            }

            if (inRuleTableData.Rules != null)
            {
                for (int i = 0; i < inRuleTableData.Rules.Length; ++i)
                {
                    Visit(inRuleTableData.Rules[i], inSourceRef);
                }
            }
        }
Esempio n. 11
0
        public virtual void Visit(NestedValue inNestedValue, TableLineRef inSourceRef)
        {
            switch (inNestedValue.Mode)
            {
            case ResolvableValueMode.Value:
            {
                Visit(inNestedValue.Value, inSourceRef);
                break;
            }

            case ResolvableValueMode.Query:
            {
                Visit(inNestedValue.Query, EntityScopedIdentifier.Type.Query, inSourceRef);
                break;
            }
            }
        }
Esempio n. 12
0
        public virtual void Visit(RSActionData inActionData, TableLineRef inSourceRef)
        {
            if (inActionData == null)
            {
                return;
            }

            inSourceRef = inSourceRef.CombineEnabled(inActionData.Enabled);

            Visit(inActionData.Action, EntityScopedIdentifier.Type.Action, inSourceRef);
            if (inActionData.Arguments != null)
            {
                for (int i = 0; i < inActionData.Arguments.Length; ++i)
                {
                    Visit(inActionData.Arguments[i], inSourceRef);
                }
            }
        }
Esempio n. 13
0
            public override void Visit(RSValue inValue, TableLineRef inSourceRef)
            {
                base.Visit(inValue, inSourceRef);

                switch (inValue.GetInnerType())
                {
                case RSValue.InnerType.Enum:
                case RSValue.InnerType.String:
                {
                    string asString = inValue.AsString;
                    if (Match(asString))
                    {
                        AddRef(inSourceRef, asString);
                    }
                    break;
                }
                }
            }
Esempio n. 14
0
            public override void Visit(RSRuleData inRuleData, TableLineRef inSourceRef)
            {
                base.Visit(inRuleData, inSourceRef);

                if (inRuleData != null)
                {
                    inSourceRef = inSourceRef.WithRule(inRuleData.Id).CombineEnabled(inRuleData.Enabled);

                    if (Match(inRuleData.Name))
                    {
                        AddRef(inSourceRef, "Rule Name: " + inRuleData.Name);
                    }

                    if (Match(inRuleData.RoutineGroup))
                    {
                        AddRef(inSourceRef, "Rule Group: " + inRuleData.RoutineGroup);
                    }
                }
            }
Esempio n. 15
0
            public override void Visit(RSValue inValue, TableLineRef inSourceRef)
            {
                switch (inValue.GetInnerType())
                {
                case RSValue.InnerType.TriggerId:
                {
                    if (inValue.AsTriggerId == m_TriggerId)
                    {
                        AddRef(inSourceRef);
                    }
                    break;
                }

                default:
                {
                    base.Visit(inValue, inSourceRef);
                    break;
                }
                }
            }
Esempio n. 16
0
        public virtual void Visit(RSResolvableValueData inResolvableValueData, TableLineRef inSourceRef)
        {
            switch (inResolvableValueData.Mode)
            {
            case ResolvableValueMode.Value:
            {
                Visit(inResolvableValueData.Value, inSourceRef);
                break;
            }

            case ResolvableValueMode.Query:
            {
                Visit(inResolvableValueData.Query, EntityScopedIdentifier.Type.Query, inSourceRef);
                if (inResolvableValueData.QueryArguments != null)
                {
                    for (int i = 0; i < inResolvableValueData.QueryArguments.Length; ++i)
                    {
                        Visit(inResolvableValueData.QueryArguments[i], inSourceRef);
                    }
                }
                break;
            }
            }
        }
Esempio n. 17
0
            public override void Visit(EntityScopedIdentifier inScopedIdentifier, EntityScopedIdentifier.Type inType, TableLineRef inSourceRef)
            {
                if (inType == EntityScopedIdentifier.Type.Action)
                {
                    if (inScopedIdentifier.Id == m_ActionId)
                    {
                        AddRef(inSourceRef);
                    }
                }

                base.Visit(inScopedIdentifier, inType, inSourceRef);
            }
Esempio n. 18
0
 protected void AddRef(TableLineRef inRef, string inDescriptor)
 {
     AddRef(inRef.WithDescriptor(inDescriptor));
 }
Esempio n. 19
0
 public virtual void Visit(EntityScopedIdentifier inScopedIdentifier, EntityScopedIdentifier.Type inType, TableLineRef inSourceRef)
 {
     Visit(inScopedIdentifier.Scope, inSourceRef);
 }
Esempio n. 20
0
 public virtual void Visit(EntityScopeData inScope, TableLineRef inSourceRef)
 {
 }