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

feat(editor): the kilometrage tool leads a line through a station along the tracks chosen, the straight paths of the switches by default, from the track chosen on along them until the line meets its tracks again or on and away at a junction, kept as //$k via lines; a track beside that comes back onto the line between the stretches it runs beside it or both ways is a track of a station, not the other track of a double-track line

This commit is contained in:
maj00r
2026-10-22 14:16:42 +02:00
parent 5ecb6ebe00
commit 7cc8e5bb9a
10 changed files with 533 additions and 38 deletions

View File

@@ -854,7 +854,7 @@ bool editor_line(char const *Mark, std::string const &Text)
{"//$r", {"#", "switch", "slip", "crossing", "double", "connection"}},
{"//$o", {"on"}},
{"//$s", {"#", "station"}},
{"//$k", {"#", "mark"}},
{"//$k", {"#", "mark", "via"}},
}};
auto const lookup{std::find_if(words.begin(), words.end(), [&](auto const &Entry) { return Entry.first == Mark; })};
if (lookup == words.end())