Skip to content

Commit 7b6859f

Browse files
committed
Automatic merge of T1.5.1-1046-g364357342f and 23 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 8f695a4: Blueprint/train car operations UI window - Pull request #885 at e267870: 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 #922 at a3bc9e7: Autopilot for timetable mode - Pull request #946 at 91a03af: Advanced track sounds - Pull request #949 at 8fdc42b: Oil Burning Locomotive - Pull request #952 at 8347095: Investigation - Pulsing graphics - Pull request #953 at a519452: Fix Lights Crash on Corrupt Shapes - Pull request #954 at 84c2f4b: Add Support for Multiple Track Profiles - Pull request #959 at 2452cb0: Fix TrackViewer crash on big zoom value - Pull request #962 at 46d0472: Fix pantographs on unpowered cars - Pull request #963 at 2d5a67d: Fix dynamic brake force indicator - Pull request #964 at b11c894: fix: Warning CA1417: Do not use the 'OutAttribute' for string parameter - Pull request #965 at 7554f02: style: Renormalize line endings - Pull request #966 at 6353e03: fix: Warning CS0618: 'string.Copy(string)' is obsolete - Pull request #967 at a799e20: Fix AI Lights After Reversing Points
25 parents 72a922a + 3643573 + dfc715e + d00beb9 + f92de76 + 8f695a4 + e267870 + 9a1d6b2 + 1f5ba4c + 5866028 + c27f32d + 3e390b8 + a3bc9e7 + 91a03af + 8fdc42b + 8347095 + a519452 + 84c2f4b + 2452cb0 + 46d0472 + 2d5a67d + b11c894 + 7554f02 + 6353e03 + a799e20 commit 7b6859f

File tree

5 files changed

+32
-31
lines changed

5 files changed

+32
-31
lines changed

Source/Orts.Simulation/Simulation/AIs/AI.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -931,11 +931,11 @@ public AITrain CreateAITrainDetail(Service_Definition sd, Traffic_Service_Defini
931931
mstsSteamLocomotive.CombinedTenderWaterVolumeUKG = ORTS.Common.Kg.ToLb(mstsSteamLocomotive.MaxLocoTenderWaterMassKG) / 10.0f * Simulator.Activity.Tr_Activity.Tr_Activity_Header.FuelWater / 100.0f;
932932

933933
// Adjust fuel stocks depending upon fuel used - in Activity mode
934-
if (mstsSteamLocomotive.SteamLocomotiveFuelType == MSTSLocomotive.SteamLocomotiveFuelTypes.Wood)
934+
if (mstsSteamLocomotive.SteamLocomotiveFuelType == MSTSSteamLocomotive.SteamLocomotiveFuelTypes.Wood)
935935
{
936936
mstsSteamLocomotive.TenderFuelMassKG = mstsSteamLocomotive.MaxTenderFuelMassKG * Simulator.Activity.Tr_Activity.Tr_Activity_Header.FuelWood / 100.0f;
937937
}
938-
else if (mstsSteamLocomotive.SteamLocomotiveFuelType == MSTSLocomotive.SteamLocomotiveFuelTypes.Oil)
938+
else if (mstsSteamLocomotive.SteamLocomotiveFuelType == MSTSSteamLocomotive.SteamLocomotiveFuelTypes.Oil)
939939
{
940940
mstsSteamLocomotive.TenderFuelMassKG = mstsSteamLocomotive.MaxTenderFuelMassKG * Simulator.Activity.Tr_Activity.Tr_Activity_Header.FuelDiesel / 100.0f;
941941
}

Source/Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -239,25 +239,6 @@ public float CurrentLocomotiveSteamHeatBoilerWaterCapacityL
239239
//float DebugSpeed = 5.0f; // Initialise at 5 mph
240240
//float DebugTimer = 0.0f;
241241

242-
public enum SteamLocomotiveFuelTypes
243-
{
244-
Unknown,
245-
Oil,
246-
Wood, // not used at the moment
247-
Coal, // defaults to coal
248-
}
249-
250-
public SteamLocomotiveFuelTypes SteamLocomotiveFuelType;
251-
252-
public enum SteamLocomotiveFeedWaterSystemTypes
253-
{
254-
Unknown,
255-
MotionPump,
256-
SteamInjector, // not used at the moment
257-
}
258-
259-
public SteamLocomotiveFeedWaterSystemTypes SteamLocomotiveFeedWaterType;
260-
261242
// Adhesion parameters
262243
public enum SlipControlType
263244
{

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

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@
8484
using Orts.Simulation.Simulation.RollingStocks.SubSystems.PowerSupplies;
8585
using Orts.Simulation.RollingStocks.SubSystems.PowerTransmissions;
8686
using SharpDX.Direct3D9;
87+
using Orts.Simulation.RollingStocks;
88+
using static Orts.Simulation.RollingStocks.MSTSSteamLocomotive;
8789

8890
namespace Orts.Simulation.RollingStocks
8991
{
@@ -684,11 +686,30 @@ public float TenderFuelMassKG // Decreased by firing and increased
684686
float ConnectRodLengthFt = 10.8f;
685687
float RodCoGFt = 4.32f; // 0.4 from crank end of rod
686688

687-
#endregion
689+
public enum SteamLocomotiveFuelTypes
690+
{
691+
Unknown,
692+
Oil,
693+
Wood,
694+
Coal, // defaults to coal
695+
}
696+
697+
public SteamLocomotiveFuelTypes SteamLocomotiveFuelType;
698+
699+
public enum SteamLocomotiveFeedWaterSystemTypes
700+
{
701+
Unknown,
702+
MotionPump,
703+
SteamInjector, // not used at the moment
704+
}
705+
706+
public SteamLocomotiveFeedWaterSystemTypes SteamLocomotiveFeedWaterType;
707+
708+
#endregion
688709

689-
#region Variables for visual effects (steam, smoke)
710+
#region Variables for visual effects (steam, smoke)
690711

691-
public readonly SmoothedData StackSteamVelocityMpS = new SmoothedData(2);
712+
public readonly SmoothedData StackSteamVelocityMpS = new SmoothedData(2);
692713
public float StackSteamVolumeM3pS;
693714
public float StackParticleDurationS;
694715
public float StackCount;

Source/Orts.Simulation/Simulation/RollingStocks/MSTSWagon.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
using System.Diagnostics;
5353
using System.IO;
5454
using System.Linq;
55-
using static Orts.Simulation.RollingStocks.MSTSLocomotive;
5655
using Event = Orts.Common.Event;
5756

5857
namespace Orts.Simulation.RollingStocks
@@ -148,7 +147,7 @@ public enum WindowState
148147
public float WagonFrontalAreaM2; // Frontal area of wagon
149148
public float TrailLocoResistanceFactor; // Factor to reduce base and wind resistance if locomotive is not leading - based upon original Davis drag coefficients
150149

151-
bool TenderWeightInitialize = true;
150+
bool TenderWeightInitialized = false;
152151
float TenderWagonMaxFuelMassKG;
153152
float TenderWagonMaxOilMassL;
154153
float TenderWagonMaxWaterMassKG;
@@ -2051,7 +2050,7 @@ public override void Update(float elapsedClockSeconds)
20512050
ConfirmSteamLocomotiveTender(); // Confirms that a tender is connected to the steam locomotive
20522051

20532052
// Adjusts water and coal mass based upon values assigned to the tender found in the WAG file rather then those defined in ENG file.
2054-
if (WagonType == WagonTypes.Tender && TenderWeightInitialize && (TenderWagonMaxFuelMassKG != 0 || TenderWagonMaxOilMassL != 0) && TenderWagonMaxWaterMassKG != 0)
2053+
if (WagonType == WagonTypes.Tender && !TenderWeightInitialized && (TenderWagonMaxFuelMassKG != 0 || TenderWagonMaxOilMassL != 0) && TenderWagonMaxWaterMassKG != 0)
20552054
{
20562055

20572056
// Find the associated steam locomotive for this tender
@@ -2075,7 +2074,7 @@ public override void Update(float elapsedClockSeconds)
20752074

20762075
TendersSteamLocomotive.MaxLocoTenderWaterMassKG = TenderWagonMaxWaterMassKG;
20772076

2078-
if (TendersSteamLocomotive.SteamLocomotiveFuelType == SteamLocomotiveFuelTypes.Oil)
2077+
if (TendersSteamLocomotive.SteamLocomotiveFuelType == MSTSSteamLocomotive.SteamLocomotiveFuelTypes.Oil)
20792078
{
20802079
TendersSteamLocomotive.MaxTenderFuelMassKG = TendersSteamLocomotive.MaxTenderOilMassL * TendersSteamLocomotive.OilSpecificGravity;
20812080
}
@@ -2092,7 +2091,7 @@ public override void Update(float elapsedClockSeconds)
20922091
}
20932092

20942093
// Rest flag so that this loop is not executed again
2095-
TenderWeightInitialize = false;
2094+
TenderWeightInitialized = true;
20962095
}
20972096

20982097
UpdateTenderLoad(); // Updates the load physics characteristics of tender and aux tender

Source/Orts.Simulation/Simulation/Simulator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1329,11 +1329,11 @@ private Train InitializePlayerTrain()
13291329
mstsSteamLocomotive.CombinedTenderWaterVolumeUKG = (Kg.ToLb(mstsSteamLocomotive.MaxLocoTenderWaterMassKG) / 10.0f) * Activity.Tr_Activity.Tr_Activity_Header.FuelWater / 100.0f;
13301330

13311331
// Adjust fuel stocks depending upon fuel used - in Explore mode
1332-
if (mstsSteamLocomotive.SteamLocomotiveFuelType == MSTSLocomotive.SteamLocomotiveFuelTypes.Wood)
1332+
if (mstsSteamLocomotive.SteamLocomotiveFuelType == MSTSSteamLocomotive.SteamLocomotiveFuelTypes.Wood)
13331333
{
13341334
mstsSteamLocomotive.TenderFuelMassKG = mstsSteamLocomotive.MaxTenderFuelMassKG * Activity.Tr_Activity.Tr_Activity_Header.FuelWood / 100.0f;
13351335
}
1336-
else if (mstsSteamLocomotive.SteamLocomotiveFuelType == MSTSLocomotive.SteamLocomotiveFuelTypes.Oil)
1336+
else if (mstsSteamLocomotive.SteamLocomotiveFuelType == MSTSSteamLocomotive.SteamLocomotiveFuelTypes.Oil)
13371337
{
13381338
mstsSteamLocomotive.TenderFuelMassKG = mstsSteamLocomotive.MaxTenderFuelMassKG * Activity.Tr_Activity.Tr_Activity_Header.FuelDiesel / 100.0f;
13391339
}

0 commit comments

Comments
 (0)