Skip to content

Commit feb126c

Browse files
committed
Automatic merge of T1.5.1-1718-gda57f73bd and 15 pull requests
- Pull request #570 at f11a428: glTF 2.0 support with PBR lighting - Pull request #900 at 4629736: DMI in 3D cab + two more dials - Pull request #1030 at d3ae4a2: Refactor settings, in prep for settings exporter - Pull request #1052 at 3b5cb90: Content Manager: Add axle count, and lowest derail force - Pull request #1062 at bbc0013: Train Forces popup Window. - Pull request #1066 at 62c89c1: Log derailment, using TraceInformation. - Pull request #892 at 1f5ba4c: Signal Function OPP_SIG_ID_TRAINPATH - Pull request #1000 at d8d9709: Locomotive operation from control car - Pull request #1049 at 6a0c471: Re-organise document storage and access - Pull request #1057 at 254b6d4: Switchable brake system - Pull request #1069 at 3f153f0: Mouse wheel control only with Alt – Followup for #1051 - Pull request #1070 at f818e40: Fix a NullReferenceException in TCS scripts - Pull request #1071 at 722dd3f: Change cover image for v1.6 - Pull request #1074 at e9a66c1: Gradient - commit 2024-16-12 - Pull request #1076 at d1ff8fd: Allow depart early
17 parents 606bdea + da57f73 + f11a428 + 4629736 + d3ae4a2 + 3b5cb90 + bbc0013 + 62c89c1 + 1f5ba4c + d8d9709 + 6a0c471 + 254b6d4 + 3f153f0 + f818e40 + 722dd3f + e9a66c1 + d1ff8fd commit feb126c

File tree

9 files changed

+464
-0
lines changed

9 files changed

+464
-0
lines changed

Source/Orts.Common/Conversions.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -782,6 +782,13 @@ public static string FormatForce(float forceN, bool isMetric)
782782
return String.Format(CultureInfo.CurrentCulture, kilo ? "{0:F1} {1}" : "{0:F0} {1}", force, unit);
783783
}
784784

785+
public static string FormatLargeForce(float forceN, bool isMetric)
786+
{
787+
var force = isMetric ? forceN : N.ToLbf(forceN);
788+
var unit = isMetric ? kN : klbf;
789+
return String.Format(CultureInfo.CurrentCulture, "{0:F1} {1}", force * 1e-3f, unit);
790+
}
791+
785792
public static string FormatTemperature(float temperatureC, bool isMetric, bool isDelta)
786793
{
787794
var temperature = isMetric ? temperatureC : isDelta ? C.ToDeltaF(temperatureC) : C.ToF(temperatureC);

Source/Orts.Common/Input/UserCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ public enum UserCommand
6464
[GetString("Display Train Car Operations Window")] DisplayTrainCarOperationsWindow,
6565
[GetString("Display Train Dpu Window")] DisplayTrainDpuWindow,
6666
[GetString("Display Next Station Window")] DisplayNextStationWindow,
67+
[GetString("Display Train Forces Window")] DisplayTrainForcesWindow,
6768
[GetString("Display Compass Window")] DisplayCompassWindow,
6869
[GetString("Display Train List Window")] DisplayTrainListWindow,
6970
[GetString("Display EOT List Window")] DisplayEOTListWindow,

Source/Orts.Settings/InputSettings.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,7 @@ static void InitializeCommands(UserCommandInput[] Commands)
518518
Commands[(int)UserCommand.DisplayTrainOperationsWindow] = new UserCommandKeyInput(0x43, KeyModifiers.Control | KeyModifiers.Alt);
519519
Commands[(int)UserCommand.DisplayTrainDpuWindow] = new UserCommandKeyInput(0x43, KeyModifiers.Shift);
520520
Commands[(int)UserCommand.DisplayEOTListWindow] = new UserCommandKeyInput(0x43, KeyModifiers.Control);
521+
Commands[(int)UserCommand.DisplayTrainForcesWindow] = new UserCommandKeyInput(0x41, KeyModifiers.Alt);
521522
Commands[(int)UserCommand.DisplayControlRectangle] = new UserCommandKeyInput(0x3F, KeyModifiers.Control);
522523

523524
Commands[(int)UserCommand.GameAutopilotMode] = new UserCommandKeyInput(0x1E, KeyModifiers.Alt);

Source/Orts.Settings/UserSettings.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,8 @@ public string DirectXFeatureLevel
390390
public int[] WindowPosition_ComposeMessage { get; set; }
391391
[Default(new[] { 100, 0 })]
392392
public int[] WindowPosition_TrainList { get; set; }
393+
[Default(new[] { 50, 50 })]
394+
public int[] WindowPosition_TrainForces { get; set; }
393395
[Default("")]
394396
public string LastViewNotificationDate { get; set; }
395397

Source/Orts.Simulation/Simulation/RollingStocks/TrainCar.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3480,7 +3480,11 @@ public LatLonDirection GetLatLonDirection()
34803480

34813481
return new LatLonDirection(latLon, directionDeg); ;
34823482
}
3483+
3484+
public int GetWagonNumAxles() { return WagonNumAxles; }
34833485

3486+
public float GetGravitationalAccelerationMpS2() { return GravitationalAccelerationMpS2; }
3487+
34843488
/// <summary>
34853489
/// Update the gravity force and % gradient of this train car at the current position
34863490
/// </summary>
807 Bytes
Loading

Source/RunActivity/RunActivity.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@
4545
<Link>Native\X64\OpenAL32.dll</Link>
4646
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
4747
</Content>
48+
<Content Include="Content\TrainForcesSprites.png">
49+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
50+
</Content>
4851
<Content Include="Content\blank.bmp">
4952
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
5053
</Content>

Source/RunActivity/Viewer3D/Popups/TrainForcesWindow.cs

Lines changed: 443 additions & 0 deletions
Large diffs are not rendered by default.

Source/RunActivity/Viewer3D/Viewer.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ public class Viewer
102102
public CarOperationsWindow CarOperationsWindow { get; private set; } // F9 sub-window for car operations
103103
public TrainDpuWindow TrainDpuWindow { get; private set; } // Shift + F9 train distributed power window
104104
public NextStationWindow NextStationWindow { get; private set; } // F10 window
105+
public TrainForcesWindow TrainForcesWindow { get; private set; } // Alt-F7 window
105106
public CompassWindow CompassWindow { get; private set; } // 0 window
106107
public TracksDebugWindow TracksDebugWindow { get; private set; } // Control-Alt-F6
107108
public SignallingDebugWindow SignallingDebugWindow { get; private set; } // Control-Alt-F11 window
@@ -512,6 +513,7 @@ internal void Initialize()
512513
CarOperationsWindow = new CarOperationsWindow(WindowManager);
513514
TrainDpuWindow = new TrainDpuWindow(WindowManager);
514515
NextStationWindow = new NextStationWindow(WindowManager);
516+
TrainForcesWindow = new TrainForcesWindow(WindowManager);
515517
CompassWindow = new CompassWindow(WindowManager);
516518
TracksDebugWindow = new TracksDebugWindow(WindowManager);
517519
SignallingDebugWindow = new SignallingDebugWindow(WindowManager);
@@ -1060,6 +1062,7 @@ void HandleUserInput(ElapsedTime elapsedTime)
10601062

10611063
if (UserInput.IsPressed(UserCommand.DisplayNextStationWindow)) if (UserInput.IsDown(UserCommand.DisplayNextWindowTab)) NextStationWindow.TabAction(); else NextStationWindow.Visible = !NextStationWindow.Visible;
10621064
if (UserInput.IsPressed(UserCommand.DisplayCompassWindow)) if (UserInput.IsDown(UserCommand.DisplayNextWindowTab)) CompassWindow.TabAction(); else CompassWindow.Visible = !CompassWindow.Visible;
1065+
if (UserInput.IsPressed(UserCommand.DisplayTrainForcesWindow)) if (UserInput.IsDown(UserCommand.DisplayNextWindowTab)) TrainForcesWindow.TabAction(); else TrainForcesWindow.Visible = !TrainForcesWindow.Visible;
10631066
if (UserInput.IsPressed(UserCommand.DebugTracks)) if (UserInput.IsDown(UserCommand.DisplayNextWindowTab)) TracksDebugWindow.TabAction(); else TracksDebugWindow.Visible = !TracksDebugWindow.Visible;
10641067
if (UserInput.IsPressed(UserCommand.DebugSignalling)) if (UserInput.IsDown(UserCommand.DisplayNextWindowTab)) SignallingDebugWindow.TabAction(); else SignallingDebugWindow.Visible = !SignallingDebugWindow.Visible;
10651068
if (UserInput.IsPressed(UserCommand.DisplayTrainListWindow)) TrainListWindow.Visible = !TrainListWindow.Visible;

0 commit comments

Comments
 (0)