#pragma warning restore CS0649

        public override bool ApplyWorker(XmlDocument xml)
        {
            bool flag = false;

            for (int i = 0; i < mods.Count; i++)
            {
                if (ModLister.GetActiveModWithIdentifier(mods[i]) != null)
                {
                    flag = true;
                    break;
                }
            }
            if (flag)
            {
                if (match != null)
                {
                    return(match.Apply(xml));
                }
            }
            else if (nomatch != null)
            {
                return(nomatch.Apply(xml));
            }
            return(true);
        }
        // Token: 0x06000004 RID: 4 RVA: 0x00002198 File Offset: 0x00000398

        // Token: 0x06000001 RID: 1 RVA: 0x00002050 File Offset: 0x00000250
        protected override bool ApplyWorker(XmlDocument xml)
        {
            var hasActiveMod    = false;
            var hasRightVersion = false;

            foreach (var name in mods)
            {
                if (!ModLister.HasActiveModWithName(name))
                {
                    continue;
                }

                hasActiveMod = true;
                break;
            }

            foreach (var checkedout in modSettingverNum)
            {
                if (!CheckSettingsVersionNumber(checkedout))
                {
                    continue;
                }

                hasRightVersion = true;
                break;
            }

            if (!hasActiveMod || !hasRightVersion)
            {
                return(true);
            }

            Log.Message("[RoR Armors] PatchOperationModVersion passed: Loading selected patch");
            if (match != null)
            {
                return(match.Apply(xml));
            }

            if (nomatch != null)
            {
                return(nomatch.Apply(xml));
            }

            return(true);
        }
Пример #3
0
        protected override bool ApplyWorker(XmlDocument xml)
        {
            bool result = test.Apply(xml);
            bool inner;

            if (result)
            {
                inner = passed.Apply(xml);
            }
            else
            {
                inner = failed.Apply(xml);
            }
            if (passInnerTest)
            {
                return(inner);
            }
            return(result);
        }
Пример #4
0
        protected override bool ApplyWorker(XmlDocument xml)
        {
            if (operation == null)
            {
                Log.Error("[ModCheck] loop set without operation");
                return(false);
            }

            for (int i = 0; i < times; ++i)
            {
                if (reset)
                {
                    try
                    {
                        ModCheckNameClass temp = operation as ModCheckNameClass;
                        temp.resetRun();
                    }
                    catch { }
                }
                operation.Apply(xml);
            }
            return(true);
        }