mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-17 12:09:19 +02:00
fix(editor): putting a drive by a switch that has one puts it in place of the old one instead of next to it; the window of a switch with a drive shows which drive it is and on which side, and picking another drive or the other side swaps the include as one undo step; the default drive is the electric ele (no lever, no lantern); the last entry of editor_pl.po is read; self-test commands driveput and drivefamily; Polish translation
This commit is contained in:
@@ -427,6 +427,15 @@ void editor_mode::selftest_step()
|
||||
auto const done{track != nullptr && flip_switch_drive(*track)};
|
||||
WriteLog("SELFTEST driveflip " + name + ": " + (done ? "done " : "failed ") + m_switch.status);
|
||||
}
|
||||
else if (command == "driveput" || command == "drivefamily")
|
||||
{
|
||||
std::string name;
|
||||
int family{-1};
|
||||
words >> name >> family;
|
||||
auto *track{simulation::Paths.find(name)};
|
||||
auto const done{track != nullptr && (command == "driveput" ? place_switch_drive(*track) : replace_switch_drive(*track, family, false))};
|
||||
WriteLog("SELFTEST " + command + " " + name + ": " + (done ? "done " : "failed ") + m_switch.status);
|
||||
}
|
||||
else if (command == "drivetilt")
|
||||
{
|
||||
std::string name;
|
||||
|
||||
Reference in New Issue
Block a user