18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-02 14:16:48 +01:00

Merge remote-tracking branch 'origin/feat/editor-photo-easy' into feat/editor-trace-photo

The line laid by the photo tells of itself as laid by the serial of the step on top of the history, as the rest of the laying does now,
not by the size of the history.
This commit is contained in:
maj00r
2026-11-24 20:30:12 +01:00
59 changed files with 882 additions and 211 deletions
+9 -3
View File
@@ -205,7 +205,7 @@ editor_mode::selftest_result editor_mode::selftest_dispatch(std::string const &c
// nmtstate logs how far the tracks going onto the terrain model are
// nmtquestion <open|flat|restore> the terrain of a new scenery offered as the first L offers it (loaded in the background where the
// scenery is placed, the line in the panel of the laying), or gone without as its button does;
// restore: the settings of the terrain made by itself put back as they were before that answer
// restore: the terrain made by itself as it was before that answer, which leaves the settings be
// gradelines <file> the grade line each track shares written to the file, for a map of them
// fitreport <file> to the file: the tracks off the terrain model, the switches off their plane, the rails on common timbers apart in height
// gradeline <lift m|off|on|whole 0/1|state> the common grade line of the route open in the profile tool: its design lifted and applied, the route taken off it and back
@@ -236,6 +236,7 @@ editor_mode::selftest_result editor_mode::selftest_dispatch(std::string const &c
// expect joint <track> <start|end> <gap m> <angle deg> <cant step mm> the end of the first path against the end of another track
// nearest to it within 1 m: the gap, the kink and the step of the cant between them, each at most
// expect records <name> <count> [kind] the records of the switch store of the name, with the connections having the switch among theirs
// expect shaped <switch> <yes|no> the switch keeps the shape its record says, or was bent out of it
// expect speed <track> <km/h> [tolerance], expect gauge <track> <m> [tolerance] as editor_track::velocity gives it / the gauge
// expect track <name> <present|removed>
// expect route <track> <in|out> the track is a part of the line open in the route tool, or not
@@ -294,8 +295,13 @@ void editor_mode::selftest_step()
std::ifstream stream(file);
std::string line;
while (std::getline(stream, line))
if (false == line.empty() && line.front() != '#')
test.lines.push_back(line);
{
// an indented comment or a line of blanks is no command either
auto const first{line.find_first_not_of(" \t\r")};
if (first == std::string::npos || line[first] == '#')
continue;
test.lines.push_back(line.substr(first));
}
WriteLog("SELFTEST: " + std::to_string(test.lines.size()) + " steps from " + file);
// the lay tool lays the bends whatever the orthophoto of the settings of the player: a case traces the photo by laymode traced
m_lay.shape_chosen = true;