Skip to content

Commit d230655

Browse files
author
Chris Jakeman
committed
Merge remote-tracking branch 'upstream/master'
2 parents ad60314 + fdbea15 commit d230655

File tree

203 files changed

+20436
-9914
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

203 files changed

+20436
-9914
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -366,4 +366,4 @@ healthchecksdb
366366

367367
# Backup folder for Package Reference Convert tool in Visual Studio 2017
368368
MigrationBackup/
369-
/Source/RunActivity/Properties/launchSettings.json
369+
/Source/**/Properties/launchSettings.json

Build.cmd

+9-6
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,9 @@ FOR /F "usebackq tokens=1* delims==" %%A IN (`CALL GetVersion.cmd %Mode%`) DO SE
8383
REM Restore NuGet packages.
8484
nuget restore Source\ORTS.sln || GOTO :error
8585

86-
REM Recreate Program directory for output.
86+
REM Recreate Program directory for output and delete previous build files.
8787
CALL :recreate "Program" || GOTO :error
88+
CALL :delete "OpenRails-%Mode%*" || GOTO :error
8889

8990
REM Build main program.
9091
REM Disable warning CS1591 "Missing XML comment for publicly visible type or member".
@@ -126,11 +127,14 @@ IF NOT "%Mode%" == "Unstable" (
126127
NET stop ClickToRunSvc
127128
NET start ClickToRunSvc
128129

129-
REM Recreate Documentation folder for output.
130-
CALL :recreate "Program\Documentation" || GOTO :error
130+
REM Create the documentation folders for output.
131+
CALL :create "Program\Documentation" || GOTO :error
132+
CALL :create "Program\Documentation\Online" || GOTO :error
133+
CALL :create "Program\Documentation\es" || GOTO :error
131134

132135
REM Compile the documentation.
133136
FOR %%E IN (doc docx docm xls xlsx xlsm odt) DO FOR %%F IN ("Source\Documentation\*.%%E") DO ECHO %%~F && OfficeToPDF.exe /bookmarks /print "%%~F" "Program\Documentation\%%~nF.pdf" || GOTO :error
137+
FOR %%E IN (doc docx docm xls xlsx xlsm odt) DO FOR %%F IN ("Source\Documentation\Online\*.%%E") DO ECHO %%~F && OfficeToPDF.exe /bookmarks /print "%%~F" "Program\Documentation\Online\%%~nF.pdf" || GOTO :error
134138
>"Source\Documentation\Manual\version.py" ECHO version = '%OpenRails_Version%' || GOTO :error
135139
>>"Source\Documentation\Manual\version.py" ECHO release = '%OpenRails_Revision%' || GOTO :error
136140
PUSHD "Source\Documentation\Manual" && CALL make.bat clean & POPD || GOTO :error
@@ -139,13 +143,13 @@ IF NOT "%Mode%" == "Unstable" (
139143
REM Copy the documentation.
140144
FOR %%F IN ("Source\Documentation\*.pdf") DO CALL :copy "%%~F" "Program\Documentation\%%~nF.pdf" || GOTO :error
141145
CALL :copy "Source\Documentation\Manual\_build\latex\Manual.pdf" "Program\Documentation\Manual.pdf" || GOTO :error
142-
CALL :create "Program\Documentation\es"
143146
CALL :copy "Source\Documentation\Manual\es\Manual.pdf" "Program\Documentation\es\Manual.pdf" || GOTO :error
144147
ROBOCOPY /MIR /NJH /NJS "Source\Documentation\SampleFiles" "Program\Documentation\SampleFiles"
145148
IF %ERRORLEVEL% GEQ 8 GOTO :error
146149

147150
REM Copy the documentation separately.
148151
FOR %%F IN ("Program\Documentation\*.pdf") DO CALL :copy "%%~F" "OpenRails-%Mode%-%%~nxF" || GOTO :error
152+
FOR %%F IN ("Program\Documentation\Online\*.pdf") DO CALL :copy "%%~F" "OpenRails-%Mode%-%%~nxF" || GOTO :error
149153
)
150154

151155
IF "%Mode%" == "Stable" (
@@ -161,8 +165,7 @@ IF "%Mode%" == "Stable" (
161165
)
162166

163167
REM Create binary and source zips.
164-
CALL :delete "OpenRails-%Mode%*.zip" || GOTO :error
165-
PUSHD "Program" && 7za.exe a -r -tzip -x^^!*.xml "..\OpenRails-%Mode%.zip" . && POPD || GOTO :error
168+
PUSHD "Program" && 7za.exe a -r -tzip -x^^!*.xml -x^^!Online "..\OpenRails-%Mode%.zip" . && POPD || GOTO :error
166169
7za.exe a -r -tzip -x^^!.* -x^^!obj -x^^!lib -x^^!_build -x^^!*.bak "OpenRails-%Mode%-Source.zip" "Source" || GOTO :error
167170

168171
ENDLOCAL

Source/Contrib/DataCollector/Program.cs

+7-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class Program
2929
static void Main(string[] args)
3030
{
3131
if (args.Contains("/system", StringComparer.OrdinalIgnoreCase))
32-
SystemInfo.WriteSystemDetails(Console.Out);
32+
CollectSystem();
3333
else if (args.Contains("/tile-terrtex", StringComparer.OrdinalIgnoreCase))
3434
CollectTileTerrtex(args);
3535
else
@@ -53,6 +53,12 @@ static void ShowHelp()
5353
Console.WriteLine(" /help Show help and usage information");
5454
}
5555

56+
static void CollectSystem()
57+
{
58+
Console.Error.WriteLine("Collecting information...");
59+
SystemInfo.WriteSystemDetails(Console.Out);
60+
}
61+
5662
struct TileTerrtexDirectory
5763
{
5864
public string Path;

Source/Contrib/SimulatorTester/UserSettings.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
// along with Open Rails. If not, see <http://www.gnu.org/licenses/>.
1717

1818
using System.Collections.Generic;
19-
using ORTS.Settings;
19+
using ORTS.Common;
2020

2121
namespace SimulatorTester
2222
{

Source/Documentation/Manual/appendices.rst

+13
Original file line numberDiff line numberDiff line change
@@ -678,6 +678,19 @@ The value speed is the required speed value in dimension as set by the relevant
678678
Inclusion of speed definition is optional and need not be set if only approach control position functions
679679
are used.
680680

681+
Signal light parameters
682+
-----------------------
683+
684+
.. index::
685+
single: ORTSSignalLightTex
686+
687+
It is possible to have different light textures in the same signal, by inserting
688+
the following parameter in the signal light definition::
689+
690+
ORTSSignalLightTex ( "name" )
691+
692+
Where **name** is the name of the texture to be used for the signal light.
693+
681694
Signal aspect parameters
682695
------------------------
683696
The following parameters can be included in signal aspect definitions.

Source/Documentation/Manual/cabs.rst

+93-34
Original file line numberDiff line numberDiff line change
@@ -20,64 +20,85 @@ next paragraphs.
2020
ETCS circular speed gauge
2121
-------------------------
2222

23-
You can add to the cabview a
24-
circular speed gauge accordingly to the European standard train control
25-
system ETCS.
23+
A circular speed gauge accordingly to the standard European Train Control System
24+
(ETCS) can be added to the cabview. The information displayed in the Driver
25+
Machine Interface (DMI) is controlled via the TCS script. For more details,
26+
see :ref:`C# engine scripting - Train Control System <features-scripting-tcs>`.
27+
2628

2729
.. image:: images/options-etcs.png
2830
:scale: 60 %
2931
:align: center
3032

3133

32-
.. admonition:: For content developers
34+
The gauge is added by the insertion of a block like the following
35+
into the .cvf file::
3336

34-
The gauge is added by the insertion of a block like the following
35-
into the .cvf file::
36-
37-
Digital (
38-
Type ( SPEEDOMETER DIGITAL )
39-
Style ( NEEDLE )
40-
Position ( 160 255 56 56 )
41-
ScaleRange ( 0 250 )
42-
Units ( KM_PER_HOUR )
43-
)
37+
Digital (
38+
Type ( SPEEDOMETER DIGITAL )
39+
Style ( NEEDLE )
40+
Position ( 160 255 56 56 )
41+
ScaleRange ( 0 250 )
42+
Units ( KM_PER_HOUR )
43+
)
4444

4545
It is also possible to display the full ETCS display using the following block
4646
instead::
4747

48-
ScreenDisplay (
49-
Type ( ORTS_ETCS SCREEN_DISPLAY )
50-
Position ( 280 272 320 240 )
51-
Units ( KM_PER_HOUR )
52-
Parameters (
53-
Mode FullSize
54-
)
55-
)
56-
57-
The following DMI size variants are available: FullSize (displays the whole DMI), SpeedArea
58-
(displays only the left part with information about distance and speed) and PlanningArea
59-
(displays only the planning area and navigation buttons).
48+
ScreenDisplay (
49+
Type ( ORTS_ETCS SCREEN_DISPLAY )
50+
Graphic ( statictexture.ace ) Comment( 3D cab only, mandatory there )
51+
Position ( 280 272 320 240 ) Comment( 2D cab only )
52+
Units ( KM_PER_HOUR )
53+
Parameters (
54+
Mode FullSize
55+
MaxSpeed 180
56+
DisplayUnits 0
57+
)
58+
)
6059

61-
The information displayed in the DMI is controlled via the TCS script. For more details,
62-
see :ref:`C# engine scripting - Train Control System <features-scripting-tcs>`.
60+
The following commonly used ``MaxSpeed`` or ``ScaleRange`` values can be set
61+
* 140, 150, 180, 240, 250, 260, 280, 400 for ``KM_PER_HOUR`` unit
62+
* 87, 111, 155, 248 for ``MILES_PER_HOUR`` unit
63+
The default value is 400 with KM_PER_HOUR unit.
6364

64-
.. _cabs-battery-switch:
65+
The following DMI size variants are available:
66+
``FullSize`` displays the whole DMI,
67+
``SpeedArea`` displays only the left part with information about distance and speed,
68+
``PlanningArea`` displays only the right side planning area and navigation buttons.
69+
The default value is FullSize
6570

66-
Battery switch
67-
--------------
71+
Use the ``MaxVisibleSpeed`` to set the highest speed displayed as a number,
72+
if literal numbering is undesirable above this number on the circular speed gauge.
73+
The default value is the MaxSpeed rounded to the highest tens below.
74+
75+
Use the ``DisplayUnits`` parameter to suppress diplaying the speed unit at the
76+
bottom of the circular speed gauge. The default is 1, displaying the units.
77+
78+
Use the ``Graphic`` parameter in 3D cabs to designate the static texture inside
79+
the .s file that will be replaced at runtime with the dynamic picture of the
80+
display. This parameter is mandatory. If omitted, or the named texture cannot
81+
be found in the model, no display will be shown.
82+
83+
.. _cabs-battery:
84+
85+
Battery
86+
-------
6887

6988
.. index::
7089
single: ORTS_BATTERY_SWITCH_COMMAND_SWITCH
7190
single: ORTS_BATTERY_SWITCH_COMMAND_BUTTON_CLOSE
7291
single: ORTS_BATTERY_SWITCH_ON
92+
single: ORTS_BATTERY_VOLTAGE
7393

74-
The :ref:`battery switch <physics-battery-switch>` controls the low voltage power supply of the locomotive.
94+
The :ref:`battery subsystem <physics-battery>` controls the low voltage power supply of the locomotive.
7595

7696
The following controls are available for the cabview:
7797

78-
- ``ORTS_BATTERY_SWITCH_COMMAND_SWITCH`` can be used if the switch is directly controlled from the cab
98+
- ``ORTS_BATTERY_SWITCH_COMMAND_SWITCH`` can be used if the battery switch is directly controlled from the cab
7999
- ``ORTS_BATTERY_SWITCH_COMMAND_BUTTON_CLOSE`` and ``ORTS_BATTERY_SWITCH_COMMAND_BUTTON_OPEN`` can be used if the switch is controlled with two pushbuttons (one to close the switch and the other to open it)
80100
- ``ORTS_BATTERY_SWITCH_ON`` can be used to control a light on the cab showing the state of the battery switch
101+
- ``ORTS_BATTERY_VOLTAGE`` monitors the battery voltage
81102

82103
Other controls can be disabled if the low voltage power supply is not available using the following parameter::
83104

@@ -166,6 +187,44 @@ The following controls are available for the cabview:
166187
- ``ORTS_ELECTRIC_TRAIN_SUPPLY_COMMAND_SWITCH`` can be used to control the electric train supply switch
167188
- ``ORTS_ELECTRIC_TRAIN_SUPPLY_ON`` can be used to indicate that the electric train supply line is powered on
168189

190+
.. _cabs-voltmeters:
191+
192+
Voltmeters
193+
----------
194+
195+
.. index::
196+
single: LINE_VOLTAGE
197+
single: ORTS_PANTOGRAPH_VOLTAGE_AC
198+
single: ORTS_PANTOGRAPH_VOLTAGE_DC
199+
single: ORTS_BATTERY_VOLTAGE
200+
201+
The following voltmeters are available for the cabview:
202+
203+
- ``LINE_VOLTAGE`` indicates the line voltage
204+
- ``ORTS_PANTOGRAPH_VOLTAGE_AC`` indicates the line voltage when operating on AC lines
205+
- ``ORTS_PANTOGRAPH_VOLTAGE_DC`` indicates the line voltage when operating on DC lines
206+
- ``ORTS_BATTERY_VOLTAGE`` indicates the vehicle's battery voltage
207+
208+
.. _cabs-electricselectors:
209+
210+
.. index::
211+
single: ORTS_PANTOGRAPH_SELECTOR
212+
single: ORTS_POWER_LIMITATION_SELECTOR
213+
single: ORTS_VOLTAGE_SELECTOR
214+
215+
There :ref:`pantograph selector <physics-pantograph-selector>`,
216+
:ref:`voltage selector <physics-voltage-selector>` and
217+
:ref:`power limitation selector <physics-power-limitation-selector>` can be used
218+
to switch the traction system for locomotives operating at different voltages.
219+
220+
They can be included in the cabview as follows:
221+
222+
- ``ORTS_PANTOGRAPH_SELECTOR`` allows selecting pre-defined pantograph arrangements
223+
(requires a custom script).
224+
- ``ORTS_VOLTAGE_SELECTOR`` configures the power supply for the voltage of the line
225+
(requires a custom script to raise the right pantograph).
226+
- ``ORTS_POWER_LIMITATION_SELECTOR`` limits the maximum power that the locomotive can draw.
227+
169228
.. _cabs-dieselenginesonoff:
170229

171230
Controls to switch on and off diesel engines
@@ -908,7 +967,7 @@ Linked two-state animations (doors type) are named ``<ORTSITEM1TWOSTATE>`` and
908967
The default animation speed for stopped/moving type animations is 8 FPS.
909968
It may be modified with following parameter in the .sd file::
910969

911-
ESD_CustomAnimationSpeed ( 8 )
970+
ESD_ORTSCustomAnimationFPS ( 8 )
912971

913972
Examples of use are fan control, open/close of aerodynamic coverages of couplers
914973
in high speed trains, menu pages switching.

0 commit comments

Comments
 (0)