Skip to content

Commit 2bf6952

Browse files
authored
Merge branch 'openrails:master' into Orge
2 parents 80b9ad9 + 1c55709 commit 2bf6952

File tree

95 files changed

+19461
-12205
lines changed

Some content is hidden

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

95 files changed

+19461
-12205
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,4 +365,5 @@ ASALocalRun/
365365
healthchecksdb
366366

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

.readthedocs.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Read the Docs configuration file for Sphinx projects
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
4+
version: 2
5+
6+
build:
7+
os: ubuntu-22.04
8+
tools:
9+
python: "3.12"
10+
11+
python:
12+
install:
13+
- requirements: Source/Documentation/Manual/requirements.txt
14+
15+
sphinx:
16+
configuration: Source/Documentation/Manual/conf.py
17+
18+
formats:
19+
- htmlzip
20+
- pdf
21+
- epub

Docs/Architecture.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,29 @@
11
# Open Rails Architecture
22

3-
This document will describe the overall structure of Open Rails and how we expect different areas of the program to work together.
3+
This document describes the overall structure of Open Rails and how we expect different areas of the program to work together.
4+
5+
## Player application model
6+
7+
The player application model describes the desired components and their relationships which make up Open Rails. Each of these will be formed from one or more libraries, as needed, and each library may contain distinct but critically linked subfunctions.
8+
9+
```mermaid
10+
flowchart TB
11+
Formats["Orts.Formats"]
12+
Game["Orts.Game"]
13+
Input["Orts.Input"]
14+
Multiplayer["Orts.Multiplayer"]
15+
Parsers["Orts.Parsers"]
16+
Player["Player"]
17+
Simulation["Orts.Simulation"]
18+
Sound["Orts.Sound"]
19+
UI["Orts.UI"]
20+
Viewer["Orts.Viewer"]
21+
Web["Orts.Web"]
22+
Player --- Game --- UI --- Viewer --- Simulation & Formats
23+
Player --- Input --- UI & Simulation
24+
Sound --- Simulation --- Formats & Multiplayer & Web
25+
Formats --- Parsers
26+
```
427

528
## Threading model
629

@@ -29,6 +52,22 @@ The threading in Open Rails has two key threads working together (Render and Upd
2952
- Web Server process
3053
- Handle all web and API requests
3154

55+
## Projects, assemblies, namespaces
56+
57+
Open Rails is made up of several component projects which are organised into subdirectories with the following naming pattern:
58+
59+
- `Orts.Component\Orts.Component.csproj` (project file)
60+
- `Orts.Component.dll` (assembly name)
61+
- `Orts.Component` (default namespace)
62+
63+
The namespaces used within code files should match the directory structure like this:
64+
65+
| *Filename* | *Namespace*
66+
|---|---|
67+
| `Orts.Component\File.cs` | `Orts.Component` |
68+
| `Orts.Component\Section\File.cs` | `Orts.Component.Section` |
69+
| `Orts.Component\Section\Subsection\File.cs` | `Orts.Component.Section.Subsection` |
70+
3271
## Simulator object relationships
3372

3473
This tree is a summary of the important object relationships (aggregation) inside the simulation. Each entry is a class whose instances can be accessed from the parent item.

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/Documentation/Manual/cabs.rst

Lines changed: 7 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

0 commit comments

Comments
 (0)