public static void SaveSettings()
        {
            ScriptSettings settings = ScriptSettings.Load("./scripts/BackToTheFutureV/settings.ini");
            CultureInfo    info     = CultureInfo.CreateSpecificCulture("en-US");

            settings.SetValue("tcd", "position_x", TCDPosition.X.ToString("G", info));
            settings.SetValue("tcd", "position_y", TCDPosition.Y.ToString("G", info));
            settings.SetValue("tcd", "scale", TCDScale.ToString("G", info));
            settings.SetValue("tcd", "background", TCDBackground.ToString());

            settings.SetValue("time_circuits", "PlayFluxCapacitorSound", PlayFluxCapacitorSound);

            settings.SetValue("time_circuits", "play_diode_sound", PlayDiodeBeep);
            settings.SetValue("time_circuits", "use_input_toggle", UseInputToggle);

            settings.SetValue("speedo", "play_speedo_beep", PlaySpeedoBeep);

            settings.SetValue("vehicle", "PlayEngineSounds", PlayEngineSounds);

            settings.SetValue("vehicle", "CinematicSpawn", CinematicSpawn);

            settings.SetValue("fly_mode", "force_fly_mode", ForceFlyMode);
            settings.SetValue("fly_mode", "LandingSystem", LandingSystem);

            settings.SetValue("time_circuits", "GlowingWormholeEmitter", GlowingWormholeEmitter);
            settings.SetValue("time_circuits", "GlowingPlutoniumReactor", GlowingPlutoniumReactor);

            settings.SetValue("events", "LightningStrikeEvent", LightningStrikeEvent);
            settings.SetValue("events", "EngineStallEvent", EngineStallEvent);
            settings.SetValue("events", "TurbulenceEvent", TurbulenceEvent);

            settings.Save();
        }
        private static void TcdBackground_OnListChanged(UIMenuListItem sender, int newIndex)
        {
            TCDBackground item = (TCDBackground)tcdBackground.Items[newIndex];

            ModSettings.TCDBackground = item;
            ModSettings.SaveSettings();
        }
Exemple #3
0
 private string GetStringFromBackgroundType(TCDBackground background)
 {
     if (background == TCDBackground.Metal)
     {
         return("metal");
     }
     else
     {
         return("trans");
     }
 }
Exemple #4
0
 public void SetBackground(TCDBackground background)
 {
     CallFunction("SET_TCD_BACKGROUND", GetStringFromBackgroundType(background));
 }