You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (ZeroError(MSTSCylinderDiameterM, "MSTSCylinderDiameter") && SteamEngines[0].CylindersDiameterM == 0)
1143
-
MSTSCylinderDiameterM = 1;
1144
-
if (ZeroError(MSTSCylinderStrokeM, "MSTSCylinderStroke") && SteamEngines[0].CylindersStrokeM == 0)
1145
-
MSTSCylinderStrokeM = 1;
1146
-
if (ZeroError(DriverWheelRadiusM, "MSTSWheelRadius"))
1147
-
DriverWheelRadiusM = Me.FromIn(30.0f); // Wheel radius of loco drive wheels can be anywhere from about 10" to 40"
1148
-
if (ZeroError(MaxBoilerPressurePSI, "MaxBoilerPressure"))
1149
-
MaxBoilerPressurePSI = 1;
1150
-
if (ZeroError(BoilerVolumeFT3, "BoilerVolume"))
1151
-
BoilerVolumeFT3 = 1;
1152
-
1153
1141
// Create a steam engine block if none exits, typically for a MSTS or BASIC configuration
1154
1142
if (SteamEngines.Count == 0)
1155
1143
{
@@ -1159,6 +1147,19 @@ public override void Initialize()
1159
1147
SteamEngines[0].Initialize();
1160
1148
}
1161
1149
1150
+
if (MSTSNumCylinders < 0 && ZeroError(MSTSNumCylinders, SteamEngines[0].NumberCylinders, "NumCylinders"))
1151
+
MSTSNumCylinders = 0;
1152
+
if (ZeroError(MSTSCylinderDiameterM, SteamEngines[0].CylindersDiameterM, "MSTSCylinderDiameter"))
1153
+
MSTSCylinderDiameterM = 1;
1154
+
if (ZeroError(MSTSCylinderStrokeM, SteamEngines[0].CylindersStrokeM, "MSTSCylinderStroke"))
1155
+
MSTSCylinderStrokeM = 1;
1156
+
if (ZeroError(DriverWheelRadiusM, SteamEngines[0].AttachedAxle.WheelRadiusM, "MSTSWheelRadius"))
1157
+
DriverWheelRadiusM = Me.FromIn(30.0f); // Wheel radius of loco drive wheels can be anywhere from about 10" to 40"
1158
+
if (ZeroError(MaxBoilerPressurePSI, 1, "MaxBoilerPressure"))
1159
+
MaxBoilerPressurePSI = 1;
1160
+
if (ZeroError(BoilerVolumeFT3, 1, "BoilerVolume"))
1161
+
BoilerVolumeFT3 = 1;
1162
+
1162
1163
// For light locomotives reduce the weight of the various connecting rods, as the default values are for larger locomotives. This will reduce slip on small locomotives
1163
1164
// It is not believed that the weight reduction on the connecting rods is linear with the weight of the locmotive. However this requires futher research, and this section is a
1164
1165
// work around until any further research is undertaken
@@ -2250,6 +2251,7 @@ public override void Update(float elapsedClockSeconds)
2250
2251
CylCockSteamUsageLBpS = 0;
2251
2252
MeanEffectivePressurePSI = 0;
2252
2253
CylinderCocksPressureAtmPSI = 0;
2254
+
SteamChestPressurePSI = 0;
2253
2255
2254
2256
for (int i = 0; i < SteamEngines.Count; i++)
2255
2257
{
@@ -2380,8 +2382,15 @@ public override void Update(float elapsedClockSeconds)
0 commit comments