17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-08 10:31:01 +01:00
Commit Graph

5 Commits

Author SHA1 Message Date
maj00r
32fadd634d refactor(tools): the grading tool in smaller functions
As Sonar asks, and a regular expression with no backtracking. The results stay
the same byte for byte on baltyk_skm1, baltyk_cargo, td and lk357.
2026-10-31 20:17:47 +01:00
maj00r
702ab5422e fix(tools): the grading tool reads files with grass in their name
A plain file like baltyk/mod/grass.scm was taken for a plant and never read,
which lost about a quarter of the plants on Baltyk, so overgrown tracks came
out better than they are. The grading is also split into steps.
2026-10-31 19:07:31 +01:00
maj00r
798e8d6a84 feat(tools): grade the tracks of any scenery for the uneven attribute
Usage:

  python tools/track_uneven_grade.py scenery/lk357.scn --out graded
  python tools/track_uneven_grade.py scenery/baltyk_skm1.scn --out graded --route -107,2300 -4120,2491

It follows the includes from a .scn, .scm or .inc, and takes the state of
each track from what the scenery shows: ballast and rail textures, grass
on the track, curves, speed and road crossings. The originals stay as they
are, copies of the files with tracks go to --out, and with no --out it
only reports. Values stay under what a pantograph can follow on those
tracks, by simulation, the rise of the wire itself not counted.

Tracks in .inc files taking parameters are skipped and rotate blocks not
applied, the report says so. See track_uneven_doc.md.
2026-10-31 18:35:00 +01:00
9935257783 Add nosonar tags 2026-10-09 18:40:31 +02:00
maj00r
b02fe0ac2b feat(editor): Signals mode of the Tracks window (H): semaphores, block, warning, shunting, stop, substitute signals and repeaters placed by the track from the templates of the scenery, described by //$e signal: (kind, mount, lamps, lean, the event the train reads them by) which tools/editor/signal_headers.py writes into them; a click by a track puts the signal on that side 2.25 m from the axis at the rail heads, facing the trains which have it on their right, a drag along turns it to the trains going the way of the drag; its (p1)_sem_info goes to event1 or event2 of the path, warning signals and repeaters, which the train doesn't read, get none; a head leaning away from the track swapped for its counterpart; the plate named like the signal; signals dragged along the track with their event, removed with it, renamed in the node properties with it, each a single step of the undo history; Polish translation 2026-10-08 03:12:16 +02:00