Пример #1
0
        public void ResetAllSettings()
        {
            Log.Message("NightVision: Defaulting Settings");

            CustomCapsEnabled = false;

            MultiplierCaps = new FloatRange(
                Constants.DEFAULT_MIN_CAP,
                Constants.DEFAULT_MAX_CAP
                );

            NVEnabledForCE = true;
            NVGameComponent.FlareRaidIsEnabled          = true;
            LightModifiersBase.PSLightModifiers.Offsets = LightModifiersBase.PSLightModifiers.DefaultOffsets.ToArray();

            LightModifiersBase.NVLightModifiers.Offsets = LightModifiersBase.NVLightModifiers.DefaultOffsets.ToArray();

            Settings.CombatStore.LoadDefaultSettings();

            Log.Message("NightVision.Storage.ResetAllSettings: Clearing Dictionaries");
            RaceLightMods              = null;
            HediffLightMods            = null;
            NVApparel                  = null;
            AllEyeCoveringHeadgearDefs = null;
            AllEyeHediffs              = null;
            AllSightAffectingHediffs   = null;
            Log.Message("NightVision.Storage.ResetAllSettings: Rebuilding Dictionaries");
            var initialiser = new Initialiser();

            initialiser.FindDefsToAddNightVisionTo();

            Settings.Cache.Reset();
            FieldClearer.ResetSettingsDependentFields();
        }
Пример #2
0
        public void Initialise()
        {
            var initialise = new Initialiser();

            initialise.Startup();

            if (Store.NullRefWhenLoading)
            {
                Write();
            }
        }