Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b9350ff

Browse files
committed
Electric locomotive hot start
1 parent b79cb2d commit b9350ff

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

Source/Menu/Options.Designer.cs

Lines changed: 0 additions & 3 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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ public OptionsForm(UserSettings settings, UpdateManager updateManager, bool init
187187
checkForcedRedAtStationStops.Checked = !Settings.NoForcedRedAtStationStops;
188188
checkDoorsAITrains.Checked = Settings.OpenDoorsInAITrains;
189189
checkDieselEnginesStarted.Checked = !Settings.NoDieselEngineStart; // Inverted as "EngineStart" is better UI than "NoEngineStart"
190+
checkElectricPowerConnected.Checked = Settings.ElectricHotStart;
190191

191192
// Keyboard tab
192193
InitializeKeyboardSettings();
@@ -472,6 +473,7 @@ void buttonOK_Click(object sender, EventArgs e)
472473
Settings.NoForcedRedAtStationStops = !checkForcedRedAtStationStops.Checked;
473474
Settings.OpenDoorsInAITrains = checkDoorsAITrains.Checked;
474475
Settings.NoDieselEngineStart = !checkDieselEnginesStarted.Checked; // Inverted as "EngineStart" is better UI than "NoEngineStart"
476+
Settings.ElectricHotStart = checkElectricPowerConnected.Checked;
475477

476478
// Keyboard tab
477479
// These are edited live.

Source/ORTS.Settings/UserSettings.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,8 @@ public enum DirectXFeature
226226
public bool HotStart { get; set; }
227227
[Default(false)]
228228
public bool NoDieselEngineStart { get; set; }
229+
[Default(false)]
230+
public bool ElectricHotStart { get; set; }
229231

230232
// Data logger settings:
231233
[Default("comma")]

Source/Orts.Simulation/Simulation/RollingStocks/MSTSElectricLocomotive.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ public override void Initialize()
131131
CurrentLocomotiveSteamHeatBoilerWaterCapacityL = L.FromGUK(800.0f);
132132
}
133133
}
134+
135+
if (Simulator.Settings.ElectricHotStart) SetPower(true);
134136
}
135137

136138
//================================================================================================//

0 commit comments

Comments
 (0)