Skip to content

Commit ea963fc

Browse files
author
Chris Jakeman
committed
Removed menu option
Can now run electric locos on non-electricified routes. An information message is shown when the pantograph is raised.
1 parent 0dc5a2c commit ea963fc

File tree

8 files changed

+3
-31
lines changed

8 files changed

+3
-31
lines changed

Source/Documentation/Manual/options.rst

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -472,11 +472,6 @@ When this option is selected, resistance to train motion is influenced by
472472
the wind speed, and the direction that it is blowing. This option is
473473
described in detail :ref:`here <physics-wind-resistance>`
474474

475-
Run electric locos on non-electrified routes
476-
--------------------------------------------
477-
478-
This option allows the running of electric locomotives on non-electrified routes.
479-
480475
Steam locomotive hot start
481476
--------------------------
482477

Source/Menu/Options.Designer.cs

Lines changed: 0 additions & 13 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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ public OptionsForm(UserSettings settings, UpdateManager updateManager, bool init
197197
checkCurveSpeedDependent.Checked = Settings.CurveSpeedDependent;
198198
checkTunnelResistanceDependent.Checked = Settings.TunnelResistanceDependent;
199199
checkWindResistanceDependent.Checked = Settings.WindResistanceDependent;
200-
checkOverrideNonElectrifiedRoutes.Checked = Settings.OverrideNonElectrifiedRoutes;
201200
checkHotStart.Checked = Settings.HotStart;
202201
checkForcedRedAtStationStops.Checked = !Settings.NoForcedRedAtStationStops;
203202
checkDoorsAITrains.Checked = Settings.OpenDoorsInAITrains;
@@ -483,7 +482,6 @@ void buttonOK_Click(object sender, EventArgs e)
483482
Settings.CurveSpeedDependent = checkCurveSpeedDependent.Checked;
484483
Settings.TunnelResistanceDependent = checkTunnelResistanceDependent.Checked;
485484
Settings.WindResistanceDependent = checkWindResistanceDependent.Checked;
486-
Settings.OverrideNonElectrifiedRoutes = checkOverrideNonElectrifiedRoutes.Checked;
487485
Settings.HotStart = checkHotStart.Checked;
488486
Settings.NoForcedRedAtStationStops = !checkForcedRedAtStationStops.Checked;
489487
Settings.OpenDoorsInAITrains = checkDoorsAITrains.Checked;

Source/ORTS.Settings/UserSettings.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,8 @@ public enum DirectXFeature
247247
public bool TunnelResistanceDependent { get; set; }
248248
[Default(false)]
249249
public bool WindResistanceDependent { get; set; }
250-
[Default(false)]
251-
public bool OverrideNonElectrifiedRoutes { get; set; }
250+
//[Default(false)]
251+
//public bool OverrideNonElectrifiedRoutes { get; set; }
252252
[Default(true)]
253253
public bool HotStart { get; set; }
254254
[Default(false)]

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,6 @@ public override void Restore(BinaryReader inf)
109109

110110
public override void Initialize()
111111
{
112-
if (!ElectricPowerSupply.RouteElectrified)
113-
Trace.WriteLine("Warning: The route is not electrified. Electric driven trains will not run!");
114-
115112
base.Initialize();
116113

117114
// If DrvWheelWeight is not in ENG file, then calculate drivewheel weight freom FoA

Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/DualModePowerSupply.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ public class ScriptedDualModePowerSupply : ScriptedLocomotivePowerSupply
3434
public bool Activated = false;
3535
private DualModePowerSupply Script => AbstractScript as DualModePowerSupply;
3636

37-
public bool RouteElectrified => Simulator.TRK.Tr_RouteFile.Electrified || Simulator.Settings.OverrideNonElectrifiedRoutes;
3837
public float LineVoltageV => (float)Simulator.TRK.Tr_RouteFile.MaxLineVoltage;
3938
public float PantographVoltageV { get; set; }
4039
public float FilterVoltageV { get; set; } = 0;

Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/ElectricPowerSupply.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ public class ScriptedElectricPowerSupply : ScriptedLocomotivePowerSupply
3434
public bool Activated = false;
3535
private ElectricPowerSupply Script => AbstractScript as ElectricPowerSupply;
3636

37-
public bool RouteElectrified => Simulator.TRK.Tr_RouteFile.Electrified || Simulator.Settings.OverrideNonElectrifiedRoutes;
3837
public float LineVoltageV => (float)Simulator.TRK.Tr_RouteFile.MaxLineVoltage;
3938
public float PantographVoltageV { get; set; }
4039
public float FilterVoltageV { get; set; } = 0;

Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/PowerSupplies/Pantograph.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -366,11 +366,8 @@ public void HandleEvent(PowerSupplyEvent evt)
366366
break;
367367
}
368368

369-
370369
if (!Simulator.TRK.Tr_RouteFile.Electrified)
371-
Simulator.Confirmer.Warning(Simulator.Catalog.GetString("No power line!"));
372-
if (Simulator.Settings.OverrideNonElectrifiedRoutes)
373-
Simulator.Confirmer.Information(Simulator.Catalog.GetString("Power line condition overridden."));
370+
Simulator.Confirmer.Information(Simulator.Catalog.GetString("Pantograph raised even though this route is not electrified"));
374371
}
375372
break;
376373
}

0 commit comments

Comments
 (0)