Skip to content

Conversation

@rwf-rr
Copy link
Contributor

@rwf-rr rwf-rr commented Apr 21, 2024

In the ContentManager, show additional properties for consists, such as: engine and car counts, total length, total weight, horsepower-per-ton, tons-per-operative-brake, etc. The latter two are North America specific - I don't know if there are equivalents for pther parts of the world.

Update Nov 2024

  • Added lowest coupler's strength to the consist info (and also to the car info).
  • Added special cases for units when using the system's locale (UK, Canada).

Details

The most significant change is that the consist view now has to read and parse each car (.wag or .eng file). The search function is negatively impacted, taking about 40% longer (in my case 2:40 min vs 2 min).

The units are based on the ORTS options. Since the ContentManager does not have a route context for consists, the system units are used in that case.

Impacted files that are not ContentManager specific:

  • Source/ORTS.Common/Conversions.cs: add methods to format HPT, TOPB and the weight bar-graph.
  • Source/Orts.Formats.Msts/ActivityFile.cs: added IsWagon flag.
  • Source/Orts.Formats.Msts/EngineFile.cs: read more properties from the .eng files.
  • Source/Orts.Formats.Msts/WagonFile.cs: read more properties from the .wag files.

Tested on: Train Simulations Scenic, Mullan Pass and Selgman packages; base MSTS packages; some Swiss packages.

Consist

The additional properties. HPT and TPOB are shown only when US Imperial units are used.
image

Also added a bar-graph to the consist, so that loads and empties are identifyable. Each asterisk represents 20 metric tons.
image

Cars

Since some of the above fields are aggregated, they might as well be shown for cars.

Engines:
image

Wagons:
image

Other

Disabled word-wrapping in the Text box, in favour of horizontal scrolling. The bar-graph is not very readable with line-wraps.

Copy link
Member

@twpol twpol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a very solid set of changes and – even though I am surprised that people are interested in the contributed Content Manager project – I am happy for it to go in.

There are just a few minor things I'd like changed, which are hopefully easy.

Pull in recent changes from upstream (openrails).
@twpol twpol added the enhancement New feature or request label Nov 20, 2024
Copy link
Member

@twpol twpol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks very much for the updates and apologies for the time it has taken me to get back and review this!

@twpol twpol merged commit 1fe38c6 into openrails:master Jan 3, 2025
1 check passed
@rwf-rr rwf-rr deleted the contentmanager-add-to-consist-info branch October 24, 2025 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Development

Successfully merging this pull request may close these issues.

2 participants