diff --git a/src/Devices/AtcDimetronic.cs b/src/Devices/AtcDimetronic.cs
index 0dd2068..ae59c1d 100644
--- a/src/Devices/AtcDimetronic.cs
+++ b/src/Devices/AtcDimetronic.cs
@@ -52,10 +52,6 @@ namespace OpenbveFcmbTrainPlugin
/// The maximum speed in YARD mode, in km/h.
private readonly double YardMaximumSpeed;
- /// Whether ATO is available or not on the train.
- private readonly bool AtoAvailable;
-
-
/// Represents an ATC speed code.
private class SpeedCode
{
@@ -94,11 +90,9 @@ namespace OpenbveFcmbTrainPlugin
/// Creates an instance of the Bombardier ATC device.
/// The maximum speed in YARD mode, in km/h.
- /// Whether ATO is available or not.
- internal AtcDimetronic(double yardMaxSpeed, bool atoAvailable)
+ internal AtcDimetronic(double yardMaxSpeed)
{
YardMaximumSpeed = yardMaxSpeed;
- AtoAvailable = atoAvailable;
}
/// Is called when the device state should be updated.
@@ -227,13 +221,9 @@ namespace OpenbveFcmbTrainPlugin
// YARD (M+25) mode selection button
if (!OpenbveFcmbTrainPlugin.KeysPressed[(int)key])
{
- // Allow change anytime the train is stopped or from ATP mode below YARD speed limit
- if ((DeviceState >= DeviceStates.NoMode && stopped) || (DeviceState == DeviceStates.ATP && train.State.Speed.KilometersPerHour < YardMaximumSpeed))
+ if (DeviceState == DeviceStates.NoMode && stopped)
{
- if (train.PhysicalHandles.Reverser == 1 || train.PhysicalHandles.Reverser == -1)
- {
- DeviceState = DeviceStates.YARD;
- }
+ DeviceState = DeviceStates.YARD;
}
}
break;
@@ -241,28 +231,12 @@ namespace OpenbveFcmbTrainPlugin
// ATP (M+ATP) mode selection button
if (!OpenbveFcmbTrainPlugin.KeysPressed[(int)key])
{
- // Allow change anytime the train is stopped or from ATO mode when running
- if ((DeviceState >= DeviceStates.NoMode && DeviceState <= DeviceStates.ATO && stopped) || DeviceState == DeviceStates.ATO)
- {
- if (train.PhysicalHandles.Reverser == 1 && TrackState > TrackStates.Unprotected)
- {
- DeviceState = DeviceStates.ATP;
- }
- }
}
break;
case VirtualKeys.K:
// ATO mode selection button
if (!OpenbveFcmbTrainPlugin.KeysPressed[(int)key])
{
- // Allow change when the train is stopped in ATP mode
- if (DeviceState == DeviceStates.ATP && stopped && AtoAvailable)
- {
- if (train.PhysicalHandles.Reverser == 1 && TrackState > TrackStates.Unprotected)
- {
- DeviceState = DeviceStates.ATO;
- }
- }
}
break;
case VirtualKeys.L:
diff --git a/src/Managers/ConfigManager.cs b/src/Managers/ConfigManager.cs
index 7b27c85..7ecd3e1 100644
--- a/src/Managers/ConfigManager.cs
+++ b/src/Managers/ConfigManager.cs
@@ -30,7 +30,6 @@ namespace OpenbveFcmbTrainPlugin
internal int AtcBombardierBlinkTime = 500;
internal int AtcDimetronicYardSpeedLimit = 25;
- internal bool AtcDimetronicAtoAvailable;
}
/// Represents the plugin settings.
@@ -203,9 +202,6 @@ namespace OpenbveFcmbTrainPlugin
}
}
break;
- case "atoavailable":
- PluginSettings.AtcDimetronicAtoAvailable = string.Compare(Value, "false", StringComparison.OrdinalIgnoreCase) != 0;
- break;
}
break;
}
diff --git a/src/Train/Train.cs b/src/Train/Train.cs
index d7d17e1..1131cd8 100644
--- a/src/Train/Train.cs
+++ b/src/Train/Train.cs
@@ -98,7 +98,7 @@ namespace OpenbveFcmbTrainPlugin
}
if (settings.AtcDimetronicDeviceEnabled)
{
- Devices.Add(new AtcDimetronic(settings.AtcDimetronicYardSpeedLimit, settings.AtcDimetronicAtoAvailable));
+ Devices.Add(new AtcDimetronic(settings.AtcDimetronicYardSpeedLimit));
}
}