Skip to content

Commit 93d0c84

Browse files
authored
Merge branch 'openrails:master' into master
2 parents 737a567 + 0641acb commit 93d0c84

File tree

103 files changed

+10669
-7313
lines changed

Some content is hidden

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

103 files changed

+10669
-7313
lines changed

.github/workflows/release-pr.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
on:
2+
push:
3+
branches:
4+
- "release/*"
5+
jobs:
6+
release-pr:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Create PR
10+
uses: funivan/github-autopr@0.2.0
11+
env:
12+
GITHUB_TOKEN: ${{ github.token }}

Build.cmd

Lines changed: 7 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -87,17 +87,10 @@ IF "%Mode%" == "Stable" (
8787
)
8888
)
8989

90-
REM Get code revision.
91-
SET Revision=000
92-
IF EXIST ".svn" (
93-
FOR /F "usebackq tokens=1" %%R IN (`svn --non-interactive info --show-item revision .`) DO SET Revision=%%R
94-
)
95-
IF EXIST ".git" (
96-
FOR /F "usebackq tokens=1" %%R IN (`git describe --first-parent --always`) DO SET Revision=%%R
97-
)
98-
IF "%Revision%" == "000" (
99-
>&2 ECHO WARNING: No Subversion or Git revision found.
100-
)
90+
REM Get product version and code revision.
91+
FOR /F "usebackq tokens=1* delims==" %%A IN (`CALL GetVersion.cmd %Mode%`) DO SET %%A=%%B
92+
SET Version=%OpenRails_Version%
93+
SET Revision=%OpenRails_Revision%
10194

10295
REM Restore NuGet packages.
10396
nuget restore Source\ORTS.sln || GOTO :error
@@ -116,19 +109,6 @@ REM Set update channel.
116109
>>Program\Updater.ini ECHO Channel=string:%Mode% || GOTO :error
117110
ECHO Set update channel to "%Mode%".
118111

119-
REM Set version number.
120-
IF NOT "%Version%" == "" (
121-
>Program\Version.txt ECHO %Version%. || GOTO :error
122-
ECHO Set version number to "%Version%".
123-
) ELSE (
124-
>Program\Version.txt ECHO X || GOTO :error
125-
ECHO Set version number to none.
126-
)
127-
128-
REM Set revision number.
129-
>Program\Revision.txt ECHO $Revision: %Revision% $ || GOTO :error
130-
ECHO Set revision number to "%Revision%".
131-
132112
REM Build locales.
133113
PUSHD Source\Locales && CALL Update.bat non-interactive && POPD || GOTO :error
134114

@@ -147,20 +127,10 @@ IF NOT EXIST "Program\Content\Web" MKDIR "Program\Content\Web"
147127
XCOPY "Source\RunActivity\Viewer3D\WebServices\Web" "Program\Content\Web" /S /Y || GOTO :error
148128

149129
REM Copy version number from OpenRails.exe into all other 1st party files
150-
SET VersionInfoVersion=0.0.0.0
151-
IF NOT "%Version%" == "" (
152-
SET VersionInfoVersion=%Version%.%Revision%
153-
) ELSE (
154-
FOR /F "usebackq tokens=1" %%V IN (`rcedit-x86.exe "Program\OpenRails.exe" --get-version-string FileVersion`) DO SET VersionInfoVersion=%%V
155-
)
156-
IF "%VersionInfoVersion%" == "0.0.0.0" (
157-
>&2 ECHO ERROR: No VersionInfoVersion found in "Program\OpenRails.exe".
158-
GOTO :error
159-
)
160130
FOR %%F IN ("Program\*.exe", "Program\Orts.*.dll", "Program\Contrib.*.dll", "Program\Tests.dll") DO (
161-
rcedit-x86.exe "%%~F" --set-product-version %VersionInfoVersion% --set-file-version %VersionInfoVersion% --set-version-string ProductVersion %VersionInfoVersion% --set-version-string FileVersion %VersionInfoVersion% || GOTO :error
131+
rcedit-x86.exe "%%~F" --set-product-version %Revision% --set-version-string ProductVersion %Version% || GOTO :error
162132
)
163-
ECHO Set product and file version information to "%VersionInfoVersion%".
133+
ECHO Set product version information to "%Version%".
164134

165135
REM *** Special build step: signs binaries ***
166136
IF NOT "%JENKINS_TOOLS%" == "" (
@@ -196,7 +166,7 @@ IF "%Mode%" == "Stable" (
196166
IF %ERRORLEVEL% GEQ 8 GOTO :error
197167
ROBOCOPY /MIR /NJH /NJS "Program\Documentation" "Open Rails\Documentation"
198168
IF %ERRORLEVEL% GEQ 8 GOTO :error
199-
>"Source\Installer\OpenRails shared\Version.iss" ECHO #define MyAppVersion "%Version%.%Revision%" || GOTO :error
169+
>"Source\Installer\OpenRails shared\Version.iss" ECHO #define MyAppVersion "%Version%" || GOTO :error
200170
iscc "Source\Installer\OpenRails from download\OpenRails from download.iss" || GOTO :error
201171
iscc "Source\Installer\OpenRails from DVD\OpenRails from DVD.iss" || GOTO :error
202172
CALL :move "Source\Installer\OpenRails from download\Output\OpenRailsTestingSetup.exe" "OpenRails-%Mode%-Setup.exe" || GOTO :error

GetVersion.cmd

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
@ECHO OFF
2+
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
3+
4+
SET Mode=%~1%
5+
FOR /F "usebackq tokens=1-2 delims=-" %%A IN (`git describe --long --exclude=*-*`) DO (
6+
SET Git.Tag=%%A
7+
SET Git.Commits=%%B
8+
)
9+
FOR /F "usebackq tokens=1-4 delims=." %%A IN (`ECHO %Git.Tag%.0.0`) DO SET Revision=%%A.%%B.%%C.%Git.Commits%
10+
GOTO %Mode%
11+
12+
13+
:stable
14+
FOR /F "usebackq tokens=* delims=-" %%A IN (`git describe`) DO SET Version=%%A
15+
GOTO :done
16+
17+
18+
:testing
19+
FOR /F "usebackq tokens=* delims=-" %%A IN (`git describe --long --exclude=*-*`) DO SET Version=%Mode:~0,1%%%A
20+
GOTO :done
21+
22+
23+
:unstable
24+
SET TZ=UTC
25+
FOR /F "usebackq tokens=1-4 delims=." %%A IN (`git log -1 --pretty^=format:%%ad --date=format-local:%%Y.%%m.%%d.%%H%%M`) DO (
26+
SET Version=%Mode:~0,1%%%A.%%B.%%C-%%D
27+
SET Revision=0.%%A.%%B%%C.%%D
28+
)
29+
GOTO :done
30+
31+
32+
:done
33+
ECHO OpenRails_Version=%Version%
34+
ECHO OpenRails_Revision=%Revision%
-32 KB
Binary file not shown.

Source/Documentation/Manual/cabs.rst

Lines changed: 87 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,91 @@ next paragraphs.
1919
OR adds support for the ETCS circular speed gauge, as described
2020
:ref:`here <options-etcs>`.
2121

22+
.. _cabs-battery-switch:
23+
24+
Battery switch
25+
--------------
26+
27+
.. index::
28+
single: ORTS_BATTERY_SWITCH_COMMAND_SWITCH
29+
single: ORTS_BATTERY_SWITCH_COMMAND_BUTTON_CLOSE
30+
single: ORTS_BATTERY_SWITCH_ON
31+
32+
The :ref:`battery switch <physics-battery-switch>` controls the low voltage power supply of the locomotive.
33+
34+
The following controls are available for the cabview:
35+
36+
- ``ORTS_BATTERY_SWITCH_COMMAND_SWITCH`` can be used if the switch is directly controlled from the cab
37+
- ``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)
38+
- ``ORTS_BATTERY_SWITCH_ON`` can be used to control a light on the cab showing the state of the battery switch
39+
40+
Other controls can be hidden if the low voltage power supply is not available using the following parameter::
41+
42+
TwoState (
43+
Type ( ORTS_CIRCUIT_BREAKER_CLOSED TWO_STATE)
44+
...
45+
DisabledIfLowVoltagePowerSupplyOff ( 1 )
46+
)
47+
48+
.. _cabs-master-key:
49+
50+
Master key
51+
----------
52+
53+
.. index::
54+
single: ORTS_MASTER_KEY
55+
single: ORTS_CURRENT_CAB_IN_USE
56+
single: ORTS_OTHER_CAB_IN_USE
57+
58+
The :ref:`master key <physics-master-key>` controls the power supply of the cab.
59+
60+
The following controls are available for the cabview:
61+
62+
- ``ORTS_MASTER_KEY`` can be used in order to control the master key
63+
- ``ORTS_CURRENT_CAB_IN_USE`` can be used to indicate that the current cab is active
64+
- ``ORTS_OTHER_CAB_IN_USE`` can be used to indicate that another cab of the train is active
65+
66+
Other controls can be hidden if the cab power supply is not available using the following parameter::
67+
68+
TwoState (
69+
Type ( ORTS_CIRCUIT_BREAKER_CLOSED TWO_STATE)
70+
...
71+
DisabledIfCabPowerSupplyOff ( 1 )
72+
)
73+
74+
.. _cabs-service-retention:
75+
76+
Service retention
77+
-----------------
78+
79+
.. index::
80+
single: ORTS_SERVICE_RETENTION_BUTTON
81+
single: ORTS_SERVICE_RETENTION_CANCELLATION_BUTTON
82+
83+
The :ref:`service retention <physics-service-retention>` can be used to disable a cab without cutting the power on the train.
84+
It can only be used with a power supply script that uses this functionality.
85+
86+
The following controls are available for the cabview:
87+
88+
- ``ORTS_SERVICE_RETENTION_BUTTON`` can be used in order to enable the service retention
89+
- ``ORTS_SERVICE_RETENTION_CANCELLATION_BUTTON`` can be used in order to cancel the service retention
90+
91+
.. _cabs-electric-train-supply:
92+
93+
Electric train supply
94+
---------------------
95+
96+
.. index::
97+
single: ORTS_ELECTRIC_TRAIN_SUPPLY_COMMAND_SWITCH
98+
single: ORTS_ELECTRIC_TRAIN_SUPPLY_ON
99+
100+
The :ref:`electric train supply <physics-electric-train-supply>` controls the power line that supplies the passenger cars with electricity.
101+
102+
The following controls are available for the cabview:
103+
104+
- ``ORTS_ELECTRIC_TRAIN_SUPPLY_COMMAND_SWITCH`` can be used to control the electric train supply switch
105+
- ``ORTS_ELECTRIC_TRAIN_SUPPLY_ON`` can be used to indicate that the electric train supply line is powered on
106+
22107
.. _cabs-dieselenginesonoff:
23108

24109
Controls to switch on and off diesel engines
@@ -329,18 +414,15 @@ Further OR cab controls
329414
-----------------------
330415

331416
OR supports the cabview control to open/close the left doors, the right doors
332-
and the mirrors. Moreover it supports the controls for the battery state and for
333-
the key state; these two controls have no effect on the state of the locomotive.
417+
and the mirrors.
334418

335419
.. index::
336420
single: ORTS_LEFTDOOR
337421
single: ORTS_RIGHTDOOR
338422
single: ORTS_MIRRORS
339-
single: ORTS_BATTERY
340-
single: ORTS_POWERKEY
341423

342424
The control blocks are like the one shown for the cab light. The Type strings
343-
are ORTS_LEFTDOOR, ORTS_RIGHTDOOR, ORTS_MIRRORS, ORTS_BATTERY and ORTS_POWERKEY.
425+
are ORTS_LEFTDOOR, ORTS_RIGHTDOOR and ORTS_MIRRORS.
344426

345427

346428
High-resolution Cab Backgrounds and Controls

Source/Documentation/Manual/driving.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,6 +1026,17 @@ You can have train cars oscillating (swaying) by hitting ``<Ctrl+V>``; if
10261026
you want more oscillation, click ``<Ctrl+V>`` again. Four levels,
10271027
including the no-oscillation level, are available by repeating ``<Ctrl+V>``.
10281028

1029+
Manual emergency braking release
1030+
--------------------------------
1031+
1032+
In some cases where the emergency braking is triggered by the simulator, it is possible to release
1033+
the emergency braking by pressing ``<Shift+Backspace>``.
1034+
1035+
The cases where the reset is allowed are:
1036+
1037+
- Signal passed at danger
1038+
- Trailed misaligned switch
1039+
10291040
.. _driving-turntable:
10301041

10311042
Engaging a turntable or a transfertable

0 commit comments

Comments
 (0)