Skip to content

Commit e775599

Browse files
committed
Automatic merge of T1.5.1-1000-gd75170a62c and 20 pull requests
- Pull request #799 at dfc715e: Consolidated wind simulation - Pull request #839 at d00beb9: First phase of https://blueprints.launchpad.net/or/+spec/additional-cruise-control-parameters - Pull request #876 at f92de76: docs: add source for documents previously on website to source Documentation folder - Pull request #882 at 58b659d: Blueprint/train car operations UI window - Pull request #885 at 56c17fb: feat: Add notifications to Menu - Pull request #891 at 9a1d6b2: Auto save - Pull request #892 at 1f5ba4c: Signal Function OPP_SIG_ID_TRAINPATH - Pull request #896 at 5866028: First implementation of https://blueprints.launchpad.net/or/+spec/specific-sounds-for-ai-trains - Pull request #900 at c27f32d: DMI updates - Pull request #903 at 3e390b8: Downloading route content (Github, zip) - Pull request #912 at 359cfee: New Triple Valve Features Vol. 2 - Pull request #922 at abe2e52: Autopilot for timetable mode - Pull request #946 at 66f836c: Advanced track sounds - Pull request #949 at aac0de8: Oil Burning Locomotive - Pull request #950 at a98ff62: Ctrl-F5 showing yellow rectangles where mouse left button is active - Pull request #951 at 486081b: fix: Fix watchdog process state name - Pull request #952 at b2af1f5: Investigation - Pulsing graphics part 1 - Pull request #953 at a519452: Fix Lights Crash on Corrupt Shapes - Pull request #954 at 84c2f4b: Add Support for Multiple Track Profiles - Pull request #956 at 25193a8: Map settings saved
22 parents 66a88b5 + d75170a + dfc715e + d00beb9 + f92de76 + 58b659d + 56c17fb + 9a1d6b2 + 1f5ba4c + 5866028 + c27f32d + 3e390b8 + 359cfee + abe2e52 + 66f836c + aac0de8 + a98ff62 + 486081b + b2af1f5 + a519452 + 84c2f4b + 25193a8 commit e775599

File tree

1 file changed

+34
-12
lines changed

1 file changed

+34
-12
lines changed

Source/Orts.Simulation/Simulation/RollingStocks/MSTSSteamLocomotive.cs

Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,11 @@ public class MSTSSteamLocomotive : MSTSLocomotive
294294
SmoothedData FuelRateOil = new SmoothedData(3); // Oil Stoker is more responsive and only takes x seconds to fully react to changing needs.
295295
SmoothedData FuelRateStoker = new SmoothedData(15); // Stoker is more responsive and only takes x seconds to fully react to changing needs.
296296
SmoothedData FuelRateCoal = new SmoothedData(45); // Automatic fireman takes x seconds to fully react to changing needs for coal firing.
297-
SmoothedData CoalBurnRateSmoothKGpS = new SmoothedData(150); // Changes in BurnRate take x seconds to fully react to changing needs - models increase and decrease in heat.
298-
SmoothedData OilBurnRateSmoothKGpS = new SmoothedData(6); // Changes in Oil BurnRate take x seconds to fully react to changing needs - models increase and decrease in heat. Oil faster then steam
299-
SmoothedData OilBurnRateReductionSmoothKGpS = new SmoothedData(0.25f); // When in reduction we would expect the heat to drop off rapidly for an oil fire
297+
SmoothedData BurnRateCoalSmoothKGpS = new SmoothedData(150); // Changes in BurnRate take x seconds to fully react to changing needs - models increase and decrease in heat.
298+
SmoothedData BurnRateOilSmoothKGpS = new SmoothedData(6); // Changes in Oil BurnRate take x seconds to fully react to changing needs - models increase and decrease in heat. Oil faster then steam
299+
SmoothedData BurnRateWoodSmoothKGpS = new SmoothedData(20); // Changes in Wood BurnRate take x seconds to fully react to changing needs - models increase and decrease in heat.
300+
301+
SmoothedData BurnRateOilReductionSmoothKGpS = new SmoothedData(0.25f); // When in reduction we would expect the heat to drop off rapidly for an oil fire
300302

301303
float FuelFeedRateSmoothedKGpS = 0.0f; // Smoothed Fuel feedd Rate
302304
public float FuelBurnRateSmoothedKGpS; // Smoothed fuel burning rate
@@ -1228,8 +1230,9 @@ public override void Restore(BinaryReader inf)
12281230
ControllerFactory.Restore(SmallEjectorController, inf);
12291231
ControllerFactory.Restore(LargeEjectorController, inf);
12301232
FuelBurnRateSmoothedKGpS = inf.ReadSingle();
1231-
CoalBurnRateSmoothKGpS.ForceSmoothValue(FuelBurnRateSmoothedKGpS);
1232-
OilBurnRateSmoothKGpS.ForceSmoothValue(FuelBurnRateSmoothedKGpS);
1233+
BurnRateCoalSmoothKGpS.ForceSmoothValue(FuelBurnRateSmoothedKGpS);
1234+
BurnRateOilSmoothKGpS.ForceSmoothValue(FuelBurnRateSmoothedKGpS);
1235+
BurnRateWoodSmoothKGpS.ForceSmoothValue(FuelBurnRateSmoothedKGpS);
12331236
BoilerHeatSmoothedBTU = inf.ReadSingle();
12341237
BoilerHeatSmoothBTU.ForceSmoothValue(BoilerHeatSmoothedBTU);
12351238
FuelFeedRateSmoothedKGpS = inf.ReadSingle();
@@ -3938,28 +3941,33 @@ private void UpdateFirebox(float elapsedClockSeconds, float absSpeedMpS)
39383941
oilburnrate = MaxFiringRateKGpS; // burning rate can never be more then the max firing rate
39393942
}
39403943

3941-
OilBurnRateReductionSmoothKGpS.Update(elapsedClockSeconds, oilburnrate);
3942-
OilBurnRateSmoothKGpS.Update(elapsedClockSeconds, oilburnrate);
3944+
BurnRateOilReductionSmoothKGpS.Update(elapsedClockSeconds, oilburnrate);
3945+
BurnRateOilSmoothKGpS.Update(elapsedClockSeconds, oilburnrate);
39433946

39443947
if (previousThrottle < throttle)
39453948
{
39463949
// Fire combustion drops rapidly if throttle closed (assume fuel feed is reduced rapidly)
3947-
FuelBurnRateSmoothedKGpS = OilBurnRateReductionSmoothKGpS.SmoothedValue;
3948-
OilBurnRateSmoothKGpS.ForceSmoothValue(oilburnrate);
3950+
FuelBurnRateSmoothedKGpS = BurnRateOilReductionSmoothKGpS.SmoothedValue;
3951+
BurnRateOilSmoothKGpS.ForceSmoothValue(oilburnrate);
39493952
}
39503953
else
39513954
{
39523955
// Fire combustion is normal
3953-
FuelBurnRateSmoothedKGpS = OilBurnRateSmoothKGpS.SmoothedValue;
3956+
FuelBurnRateSmoothedKGpS = BurnRateOilSmoothKGpS.SmoothedValue;
39543957
}
39553958

39563959
previousThrottle = throttle;
39573960

39583961
}
3962+
else if (SteamLocomotiveFuelType == SteamLocomotiveFuelTypes.Wood)
3963+
{
3964+
BurnRateWoodSmoothKGpS.Update(elapsedClockSeconds, BurnRateRawKGpS);
3965+
FuelBurnRateSmoothedKGpS = BurnRateWoodSmoothKGpS.SmoothedValue;
3966+
}
39593967
else
39603968
{
3961-
CoalBurnRateSmoothKGpS.Update(elapsedClockSeconds, BurnRateRawKGpS);
3962-
FuelBurnRateSmoothedKGpS = CoalBurnRateSmoothKGpS.SmoothedValue;
3969+
BurnRateCoalSmoothKGpS.Update(elapsedClockSeconds, BurnRateRawKGpS);
3970+
FuelBurnRateSmoothedKGpS = BurnRateCoalSmoothKGpS.SmoothedValue;
39633971
}
39643972

39653973
FuelBurnRateSmoothedKGpS = MathHelper.Clamp(FuelBurnRateSmoothedKGpS, 0.0f, MaxFuelBurnGrateKGpS); // clamp burnrate to max fuel that can be burnt within grate limit
@@ -4013,22 +4021,36 @@ private void UpdateFirebox(float elapsedClockSeconds, float absSpeedMpS)
40134021
FuelBoost = true; // boost shoveling
40144022
if (!StokerIsMechanical && IsPlayerTrain) // Don't display message if stoker in operation
40154023
{
4024+
if (SteamLocomotiveFuelType == SteamLocomotiveFuelTypes.Wood)
4025+
{
4026+
Simulator.Confirmer.Message(ConfirmLevel.Warning, Simulator.Catalog.GetString("FireMass is getting low. Your fireman will add fuel faster, but don't wear him out."));
4027+
}
4028+
else
4029+
{
40164030
Simulator.Confirmer.Message(ConfirmLevel.Warning, Simulator.Catalog.GetString("FireMass is getting low. Your fireman will shovel faster, but don't wear him out."));
40174031
}
40184032
}
40194033
}
40204034
}
4035+
}
40214036
else if (FireMassKG >= IdealFireMassKG) // If firemass has returned to normal - turn boost off
40224037
{
40234038
if (FuelBoost)
40244039
{
40254040
FuelBoost = false; // disable boost shoveling
40264041
if (!StokerIsMechanical && IsPlayerTrain) // Don't display message if stoker in operation
40274042
{
4043+
if (SteamLocomotiveFuelType == SteamLocomotiveFuelTypes.Wood)
4044+
{
4045+
Simulator.Confirmer.Message(ConfirmLevel.Warning, Simulator.Catalog.GetString("FireMass is back within limits. Your fireman will add fuel as normal."));
4046+
}
4047+
else
4048+
{
40284049
Simulator.Confirmer.Message(ConfirmLevel.Warning, Simulator.Catalog.GetString("FireMass is back within limits. Your fireman will shovel as per normal."));
40294050
}
40304051
}
40314052
}
4053+
}
40324054
if (FuelBoost && !FuelBoostReset) // if fuel boost is still on, and hasn't been reset - needs further refinement as this shouldn't be able to be maintained indefinitely
40334055
{
40344056
DisplayMaxFiringRateKGpS = MaxTheoreticalFiringRateKgpS; // Set display value with temporary higher shovelling level

0 commit comments

Comments
 (0)