Skip to content

Commit c46eb0d

Browse files
authored
Merge branch 'master' into manual-news
2 parents f7ba507 + 2319f7f commit c46eb0d

File tree

79 files changed

+3398
-861
lines changed

Some content is hidden

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

79 files changed

+3398
-861
lines changed

Docs/Contributing.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ If you've got a feature suggestion for Open Rails, please report it in [our road
1818

1919
You are free to make any modifications to the Open Rails code that you like; that's how open source works. However, if you'd like your feature to be included in the official version, there is a process to ensure that the community agrees and to review the code for potential issues prior to inclusion.
2020

21-
In most cases, you can get started immediately with making the changes and creating a pull request. We do ask for some additional steps to be taken for some bugs and all new features, but they can come before or after the pull request. Please feel free to share ideas and proposals as pull requests!
21+
In most cases, you can get started immediately with making the changes and creating a pull request. We have _additional requirements_ for some bugs and all new features, but they can come before or after the pull request is created. Please feel free to share ideas and proposals as pull requests!
2222

2323
**Note:** You must fork the Open Rails repository before you start working on it. We do not allow you to push branches to the official repository.
2424

@@ -28,19 +28,25 @@ In most cases, you can get started immediately with making the changes and creat
2828

2929
If you'd like to improve the [documentation](./), [manual](../Source/Documentation/Manual), or [translations](../Source/Locales) you can get started immediately.
3030

31-
There are no requirements for the pull request.
31+
There are no additional requirements for the pull request.
3232

3333
### Contributed projects
3434

3535
If you'd like to improve the [contributed projects](../Source/Contrib) you can get started immediately.
3636

37-
There are no requirements for the pull request.
37+
There are no additional requirements for the pull request.
38+
39+
### Refactoring process
40+
41+
If you'd like to refactor the existing code you can get started immediately, but please have a look at our [architecture requirements](#architecture-requirements). We welcome architectural discussions on our [forum](http://www.elvastower.com/forums/index.php?/forum/256-developing-features/).
42+
43+
There are no additional requirements for the pull request.
3844

3945
### Bug process
4046

4147
If you'd like to fix a bug, you can get started immediately. If the fix turns out to be very small, you do not even need a bug report. Otherwise, you will need to make sure it has been reported on [our bug tracker on Launchpad](https://bugs.launchpad.net/or). If it has not, you can report the bug *and* fix it!
4248

43-
There are no requirements for creating the pull request.
49+
There are no additional requirements for _creating_ the pull request.
4450

4551
These things must be done in the required order:
4652

Source/ContentChecker/ContentChecker.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net472</TargetFramework>
3+
<TargetFrameworks Condition="'$(BuildDotNet)' == 'true'">net6-windows</TargetFrameworks>
4+
<TargetFrameworks Condition="'$(TargetFrameworks)' == ''">net472</TargetFrameworks>
45
<OutputType>Exe</OutputType>
56
<UseWindowsForms>true</UseWindowsForms>
67
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>

Source/Contrib/ActivityEditor/ActivityEditor/ActivityEditor.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net472</TargetFramework>
3+
<TargetFrameworks Condition="'$(BuildDotNet)' == 'true'">net6-windows</TargetFrameworks>
4+
<TargetFrameworks Condition="'$(TargetFrameworks)' == ''">net472</TargetFrameworks>
45
<OutputType>WinExe</OutputType>
56
<AssemblyName>Contrib.ActivityEditor</AssemblyName>
67
<ApplicationIcon>..\..\..\ORTS.ico</ApplicationIcon>

Source/Contrib/ActivityEditor/LibAE/LibAE.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net472</TargetFramework>
3+
<TargetFrameworks Condition="'$(BuildDotNet)' == 'true'">net6-windows</TargetFrameworks>
4+
<TargetFrameworks Condition="'$(TargetFrameworks)' == ''">net472</TargetFrameworks>
45
<OutputType>Library</OutputType>
56
<AssemblyName>Contrib.LibAE</AssemblyName>
67
<IsPublishable>False</IsPublishable>

Source/Contrib/ContentManager/ContentManager.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net472</TargetFramework>
3+
<TargetFrameworks Condition="'$(BuildDotNet)' == 'true'">net6-windows</TargetFrameworks>
4+
<TargetFrameworks Condition="'$(TargetFrameworks)' == ''">net472</TargetFrameworks>
45
<OutputType>WinExe</OutputType>
56
<RootNamespace>ORTS.ContentManager</RootNamespace>
67
<AssemblyName>Contrib.ContentManager</AssemblyName>

Source/Contrib/ContentManager/ContentManagerGUI.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,8 @@ void searchBox_TextChanged(object sender, EventArgs e)
270270
var content = pending[path];
271271
pending.Remove(path);
272272

273-
if (content.Name.ToLowerInvariant().Contains(search))
273+
// do not add root element to search results, see bug 1944070
274+
if (content.Type != ContentType.Root && content.Name.ToLowerInvariant().Contains(search))
274275
finds.Add(new SearchResult(content, path));
275276

276277
foreach (var child in ((ContentType[])Enum.GetValues(typeof(ContentType))).SelectMany(ct => content.Get(ct)))

Source/Contrib/DataCollector/DataCollector.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net472</TargetFramework>
3+
<TargetFrameworks Condition="'$(BuildDotNet)' == 'true'">net6-windows</TargetFrameworks>
4+
<TargetFrameworks Condition="'$(TargetFrameworks)' == ''">net472</TargetFrameworks>
45
<OutputType>Exe</OutputType>
56
<RootNamespace>ORTS.DataCollector</RootNamespace>
67
<AssemblyName>Contrib.DataCollector</AssemblyName>

Source/Contrib/DataConverter/DataConverter.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net472</TargetFramework>
3+
<TargetFrameworks Condition="'$(BuildDotNet)' == 'true'">net6-windows</TargetFrameworks>
4+
<TargetFrameworks Condition="'$(TargetFrameworks)' == ''">net472</TargetFrameworks>
45
<OutputType>Exe</OutputType>
56
<RootNamespace>Orts.DataConverter</RootNamespace>
67
<AssemblyName>Contrib.DataConverter</AssemblyName>

Source/Contrib/DataValidator/DataValidator.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net472</TargetFramework>
3+
<TargetFrameworks Condition="'$(BuildDotNet)' == 'true'">net6-windows</TargetFrameworks>
4+
<TargetFrameworks Condition="'$(TargetFrameworks)' == ''">net472</TargetFrameworks>
45
<OutputType>Exe</OutputType>
56
<AssemblyName>Contrib.DataValidator</AssemblyName>
67
<IsPublishable>False</IsPublishable>

Source/Contrib/SimulatorTester/SimulatorTester.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net472</TargetFramework>
3+
<TargetFrameworks Condition="'$(BuildDotNet)' == 'true'">net6-windows</TargetFrameworks>
4+
<TargetFrameworks Condition="'$(TargetFrameworks)' == ''">net472</TargetFrameworks>
45
<OutputType>Exe</OutputType>
56
<RootNamespace>Orts.SimulatorTester</RootNamespace>
67
<AssemblyName>Contrib.SimulatorTester</AssemblyName>

Source/Contrib/TrackViewer/TrackViewer.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net472</TargetFramework>
3+
<TargetFrameworks Condition="'$(BuildDotNet)' == 'true'">net6-windows</TargetFrameworks>
4+
<TargetFrameworks Condition="'$(TargetFrameworks)' == ''">net472</TargetFrameworks>
45
<OutputType>WinExe</OutputType>
56
<RootNamespace>ORTS.TrackViewer</RootNamespace>
67
<AssemblyName>Contrib.TrackViewer</AssemblyName>

Source/Documentation/Manual/cabs.rst

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -684,14 +684,16 @@ Air Flow Meter
684684

685685
.. index::
686686
single: ORTS_AIR_FLOW_METER
687+
single: ORTS_TRAIN_AIR_FLOW_METER
687688

688689
This cabview control is used on some locomotives, particularly in North America, to show the
689690
volumetric flow rate of air moving from the main res to the brake pipe during release/recharge.
690691
Such an indication can be used to determine when brake pipe charging is complete,
691692
measure the amount of brake pipe leakage, and so on.
692693
The control will only function on locomotives with air brakes.
693694

694-
Here is an example implementation of ORTS_AIR_FLOW_METER as an analog dial::
695+
Here is an example implementation of ORTS_AIR_FLOW_METER as an analog dial (display types other
696+
than analog dials can be used)::
695697

696698

697699
Dial (
@@ -706,8 +708,10 @@ Here is an example implementation of ORTS_AIR_FLOW_METER as an analog dial::
706708
DirIncrease ( 0 )
707709
)
708710

709-
Applicable user-defined units are CUBIC_FT_MIN, LITERS_S, LITERS_MIN, and CUBIC_M_S. Cubic meters per
710-
second will be used if no units are specified.
711+
Alternately, a control type of ORTS_TRAIN_AIR_FLOW_METER can be used to display the total
712+
air flow rate of all locomotives, useful for distributed power where multiple locomotives can
713+
charge the brake pipe simultaneously. Applicable user-defined units are CUBIC_FT_MIN, LITERS_S,
714+
LITERS_MIN, and CUBIC_M_S. Cubic meters per second will be used if no units are specified.
711715

712716

713717
Animated 2D Wipers
@@ -781,6 +785,33 @@ can be customized with following line, to be added within the control block in t
781785
.cvf file::
782786

783787
ORTSLabel ( "string" )
788+
789+
Custom Display Units
790+
--------------------
791+
792+
Due to the wide variety of railroad equipment across the world, Open Rails may not
793+
provide the units of measure needed for a cabview control. In this case, the tokens
794+
`ORTSUnitsExponent`, `ORTSUnitsScaleFactor`, and `ORTSUnitsOffset` can be added
795+
to the control block in the .cvf file to create the units of measure required for
796+
the cab view.
797+
798+
- ORTSUnitsExponent ( x ): Raises the value shown by the cab view control to the
799+
power of x, which may be used to calibrate nonlinear gauges or complete nonlinear
800+
conversions. Fractional and negative values are allowed. For example, an accelerometer
801+
gauge with ORTSUnitsExponent ( 0.5 ) would change the accelerometer to be more sensitive
802+
to small accelerations, but less sensitive to large acceleration. (However, the values
803+
shown would not be in any meaningful units.)
804+
- ORTSUnitsScaleFactor ( y ): After accounting for any exponent, multiplies the value
805+
shown by the cab view control by a factor of y, allowing for arbitrary conversion of
806+
units of measure. For example, a cab view control displaying MILES_PER_HOUR with
807+
ORTSUnitsScaleFactor ( 1.467 ) would instead display a value equivalent to feet per second.
808+
- ORTSUnitsOffset ( z ): After applying the scale factor, adds z to the value shown
809+
by the cab view control. To subtract from the shown value, set z to a negative number.
810+
For example, a cab view control with units of BAR and ORTSUnitsOffset ( 0.987 ) would show
811+
pressure as absolute pressure, rather than gauge pressure.
812+
813+
Note that while these tokens can be used to convert between many units, it is recommended
814+
to use built in Open Rails units wherever suitable.
784815

785816
Multiple screen pages on displays
786817
---------------------------------

0 commit comments

Comments
 (0)