Skip to content

Commit 408bb86

Browse files
committed
Automatic merge of T1.5.1-1288-g58b2418aa6 and 13 pull requests
- Pull request #839 at d00beb9: First phase of https://blueprints.launchpad.net/or/+spec/additional-cruise-control-parameters - Pull request #892 at 1f5ba4c: Signal Function OPP_SIG_ID_TRAINPATH - Pull request #952 at 8347095: Investigation - Pulsing graphics - Pull request #953 at a519452: Fix Lights Crash on Corrupt Shapes - Pull request #954 at f9e62b1: Multiple Track Profiles & Superelevation Rewrite - Pull request #972 at e90a2aa: On Map window color changed switch or signal is not changed - Pull request #981 at 10d297f: Multiple type trainset lightglows - Pull request #982 at efcf19c: WEB based Switch Panel enhancement: Alerter - Pull request #984 at 0f8122e: Player train switching for timetable mode - Pull request #986 at 5d7e692: Fix: The TrainCarOperations window does not resize correctly. - Pull request #987 at 232e8fb: fix: Temporary workaround for building with NET 5+ - Pull request #900 at c27f32d: DMI updates - Pull request #876 at f92de76: docs: add source for documents previously on website to source Documentation folder
15 parents ee61ca6 + 58b2418 + d00beb9 + 1f5ba4c + 8347095 + a519452 + f9e62b1 + e90a2aa + 10d297f + efcf19c + 0f8122e + 5d7e692 + 232e8fb + c27f32d + f92de76 commit 408bb86

File tree

5 files changed

+3
-144
lines changed

5 files changed

+3
-144
lines changed

Source/Menu/Options.Designer.cs

Lines changed: 2 additions & 73 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Source/Menu/Options.cs

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,6 @@ public OptionsForm(UserSettings settings, UpdateManager updateManager, bool init
165165
comboPressureUnit.Text = Settings.PressureUnit;
166166
comboOtherUnits.Text = settings.Units;
167167
checkEnableTCSScripts.Checked = !Settings.DisableTCSScripts; // Inverted as "Enable scripts" is better UI than "Disable scripts"
168-
checkAutoSaveActive.Checked = Settings.AutoSaveActive;
169-
ButtonAutoSave15.Checked = checkAutoSaveActive.Checked & Settings.AutoSaveInterval == 15;
170-
ButtonAutoSave30.Checked = checkAutoSaveActive.Checked & Settings.AutoSaveInterval == 30;
171-
ButtonAutoSave60.Checked = checkAutoSaveActive.Checked & Settings.AutoSaveInterval == 60;
172168

173169
// Audio tab
174170
numericSoundVolumePercent.Value = Settings.SoundVolumePercent;
@@ -460,8 +456,6 @@ void buttonOK_Click(object sender, EventArgs e)
460456
Settings.PressureUnit = comboPressureUnit.SelectedValue.ToString();
461457
Settings.Units = comboOtherUnits.SelectedValue.ToString();
462458
Settings.DisableTCSScripts = !checkEnableTCSScripts.Checked; // Inverted as "Enable scripts" is better UI than "Disable scripts"
463-
Settings.AutoSaveActive = checkAutoSaveActive.Checked;
464-
Settings.AutoSaveInterval = ButtonAutoSave15.Checked ? 15 : ButtonAutoSave30.Checked ? 30 : 60;
465459

466460
// Audio tab
467461
Settings.SoundVolumePercent = (int)numericSoundVolumePercent.Value;
@@ -813,50 +807,6 @@ private void checkPerformanceTuner_Click(object sender, EventArgs e)
813807
labelPerformanceTunerTarget.Enabled = checkPerformanceTuner.Checked;
814808
}
815809

816-
private void checkAutoSave_checkchanged(object sender, EventArgs e)
817-
{
818-
if (checkAutoSaveActive.Checked)
819-
{
820-
ButtonAutoSave15.Enabled = true;
821-
ButtonAutoSave15.Checked = Settings.AutoSaveInterval == 15;
822-
ButtonAutoSave30.Enabled = true;
823-
ButtonAutoSave30.Checked = Settings.AutoSaveInterval == 30;
824-
ButtonAutoSave60.Enabled = true;
825-
ButtonAutoSave60.Checked = Settings.AutoSaveInterval == 60;
826-
}
827-
else
828-
{
829-
ButtonAutoSave15.Checked = false;
830-
ButtonAutoSave15.Enabled = false;
831-
ButtonAutoSave30.Checked = false;
832-
ButtonAutoSave30.Enabled = false;
833-
ButtonAutoSave60.Checked = false;
834-
ButtonAutoSave60.Enabled = false;
835-
}
836-
}
837-
838-
private void buttonAutoSaveInterval_checkchanged(object sender, EventArgs e)
839-
{
840-
if (ButtonAutoSave15.Checked)
841-
{
842-
Settings.AutoSaveInterval = 15;
843-
ButtonAutoSave30.Checked = false;
844-
ButtonAutoSave60.Checked = false;
845-
}
846-
else if (ButtonAutoSave30.Checked)
847-
{
848-
Settings.AutoSaveInterval = 30;
849-
ButtonAutoSave15.Checked = false;
850-
ButtonAutoSave60.Checked = false;
851-
}
852-
else if (ButtonAutoSave60.Checked)
853-
{
854-
Settings.AutoSaveInterval = 60;
855-
ButtonAutoSave15.Checked = false;
856-
ButtonAutoSave30.Checked = false;
857-
}
858-
}
859-
860810
#region Help for Options
861811
// The icons all share the same code which assumes they are named according to a simple scheme as follows:
862812
// 1. To add a new Help Icon, copy an existing one and paste it onto the tab.

Source/ORTS.Settings/UserSettings.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,6 @@ public enum DirectXFeature
168168
public String Units { get; set; }
169169
[Default(false)]
170170
public bool DisableTCSScripts { get; set; }
171-
[Default(false)]
172-
public bool AutoSaveActive { get; set; }
173-
[Default (15)]
174-
public int AutoSaveInterval { get; set; }
175171

176172
// Audio settings:
177173
[Default(100)]

Source/RunActivity/Viewer3D/Popups/QuitWindow.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ void buttonQuit_Click(Control arg1, Point arg2)
7070
void buttonSave_Click(Control arg1, Point arg2)
7171
{
7272
GameStateRunActivity.Save();
73-
Owner.Viewer.LastSave = Owner.Viewer.RealTime + 60 * Owner.Viewer.Simulator.Settings.AutoSaveInterval;
7473
}
7574

7675
void buttonContinue_Click(Control arg1, Point arg2)

Source/RunActivity/Viewer3D/Viewer.cs

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ public class Viewer
7979
/// Monotonically increasing time value (in seconds) for the game/viewer. Starts at 0 and only ever increases, at real-time.
8080
/// </summary>
8181
public double RealTime { get; private set; }
82-
public double LastSave = -1;
8382
InfoDisplay InfoDisplay;
8483
public WindowManager WindowManager { get; private set; }
8584
public MessagesWindow MessagesWindow { get; private set; } // Game message window (special, always visible)
@@ -308,8 +307,6 @@ public Viewer(Simulator simulator, Orts.Viewer3D.Processes.Game game)
308307
Settings = simulator.Settings;
309308
Use3DCabProperty = Settings.GetSavingProperty<bool>("Use3DCab");
310309

311-
LastSave = Simulator.Settings.AutoSaveInterval * 60;
312-
313310
RenderProcess = game.RenderProcess;
314311
UpdaterProcess = game.UpdaterProcess;
315312
LoaderProcess = game.LoaderProcess;
@@ -761,14 +758,6 @@ public void Update(RenderFrame frame, float elapsedRealTime)
761758
RealTime += elapsedRealTime;
762759
var elapsedTime = new ElapsedTime(Simulator.GetElapsedClockSeconds(elapsedRealTime), elapsedRealTime);
763760

764-
// auto save
765-
if (Simulator.Settings.AutoSaveActive && RealTime > LastSave && !Simulator.Paused)
766-
{
767-
GameStateRunActivity.Save();
768-
LastSave = RealTime + Simulator.Settings.AutoSaveInterval * 60;
769-
}
770-
771-
// show message
772761
if (ComposeMessageWindow.Visible == true)
773762
{
774763
UserInput.Handled();
@@ -984,11 +973,7 @@ void HandleUserInput(ElapsedTime elapsedTime)
984973
Simulator.GameSpeed = 1;
985974
Simulator.Confirmer.ConfirmWithPerCent(CabControl.SimulationSpeed, CabSetting.Off, Simulator.GameSpeed * 100);
986975
}
987-
if (UserInput.IsPressed(UserCommand.GameSave))
988-
{
989-
GameStateRunActivity.Save();
990-
LastSave = RealTime + 60 * Simulator.Settings.AutoSaveInterval;
991-
}
976+
if (UserInput.IsPressed(UserCommand.GameSave)) { GameStateRunActivity.Save(); }
992977
if (UserInput.IsPressed(UserCommand.DisplayHelpWindow)) if (UserInput.IsDown(UserCommand.DisplayNextWindowTab)) HelpWindow.TabAction(); else HelpWindow.Visible = !HelpWindow.Visible;
993978
if (UserInput.IsPressed(UserCommand.DisplayTrackMonitorWindow)) if (UserInput.IsDown(UserCommand.DisplayNextWindowTab)) TrackMonitorWindow.TabAction(); else TrackMonitorWindow.Visible = !TrackMonitorWindow.Visible;
994979
if (UserInput.IsPressed(UserCommand.DisplayTrainDrivingWindow)) if (UserInput.IsDown(UserCommand.DisplayNextWindowTab)) TrainDrivingWindow.TabAction(); else TrainDrivingWindow.Visible = !TrainDrivingWindow.Visible;

0 commit comments

Comments
 (0)