Exemplo n.º 1
0
        public void Validate()
        {
            if (versionID != BvMain.configVersionID)
            {
                versionID = BvMain.configVersionID;
            }

            if (menu != null)
            {
                menu.Validate();
            }
            else
            {
                menu = PropMenuConfig.Defaults;
            }

            if (binds != null)
            {
                binds.Validate();
            }
            else
            {
                binds = BindsConfig.Defaults;
            }

            if (propertyBlock != null)
            {
                propertyBlock.Validate();
            }
            else
            {
                propertyBlock = PropBlockConfig.Defaults;
            }
        }
Exemplo n.º 2
0
        public override void Validate()
        {
            if (VersionID != vID)
            {
                VersionID    = vID;
                targeting    = TargetingConfig.Defaults;
                genUI        = UIConfig.Defaults;
                block        = PropBlockConfig.Defaults;
                binds        = BindsConfig.Defaults;
                WasConfigOld = true;
            }
            else
            {
                if (targeting != null)
                {
                    targeting.Validate();
                }
                else
                {
                    targeting = TargetingConfig.Defaults;
                }

                if (genUI != null)
                {
                    genUI.Validate();
                }
                else
                {
                    genUI = UIConfig.Defaults;
                }

                if (binds != null)
                {
                    binds.Validate();
                }
                else
                {
                    binds = BindsConfig.Defaults;
                }

                if (block != null)
                {
                    block.Validate();
                }
                else
                {
                    block = PropBlockConfig.Defaults;
                }

                if (genUI.legacyModeEnabled)
                {
                    targeting.canOpenIfPlacing = true;
                }
            }
        }