18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-01 12:57:06 +01:00
Files
maszyna/editor/layout
maj00r 348cc2df47 fix(editor): migrated switches leave to the side their records say, bent ones migrate, a record fitting two types isn't guessed
- The migration mapped L to hand 1, but switch_store::classify() writes R where the diverging end lies to the positive cross of
  the direction, which is the side of hand 1 of the domain (its curvature above 0 turns that way). Every migrated switch came
  out mirrored, and the test checked hand == 1 for an L record without looking at where the diverging end lies. R is hand 1
  now, and the test checks the side of the diverging end.
- classify() writes a switch bent into a curve as Rlj or Rld with the radius of the ordinary switch it's bent from; the
  catalogue has it as an Rz, so no bent switch could migrate. They're looked up as Rz.
- catalogue_type() took the first loose match. A movable nose isn't in the record, so the ordinary frog is taken where the
  catalogue has both; a record fitting two other types (the variants of an Rpd) is kept as it was, why with it.
- Slips and crossings are kept as they were, as the header of the migration says.
- Smaller: the type looked up is checked before its length is read; new diverging, slip and crossing tracks get the
  chainage of the turnout as a diverging track had before; the walk of a bent transition stops on a step that turned nothing
  instead of dividing by it.
- Sonar: the leg check skips an end whose turnout isn't found (S2259), the spacing of a crossover is measured in whole steps
  counted in an integer (S2193), the seeded generator of the turnout kinds test is marked (S2245).
2026-11-24 19:15:13 +01:00
..