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

feat(editor): the Signals tool goes into the signalling one: its templates under Signals in the SRK panel, the ones the station's signals are placed with too; a click on a tile or Place by a track arms placing, Esc or a click on the armed tile stops it, a click on a track else opening its station; a signal picked in 3D or in Signal heads shows its card at the top of the panel, its template, to the other side, turn around; H no longer a tool

This commit is contained in:
maj00r
2026-10-23 12:26:07 +02:00
parent 2d9be3ae10
commit eab3dca700
12 changed files with 168 additions and 119 deletions

View File

@@ -53,7 +53,7 @@ editor_mode::selftest_result editor_mode::selftest_signal(std::string const &com
if (command == "signal" || command == "signalmove" || command == "signaldelete" || command == "signalrename" || command == "signalprobe" || command == "signalflip" || command == "signalturn" || command == "signalselect" || command == "signalswap")
{
auto values{selftest_values(words)};
show_track_tab(track_tab::signals);
show_track_tab(track_tab::srk);
signal_scan();
signal_refresh(true);
auto &tool{m_signal};
@@ -96,12 +96,12 @@ editor_mode::selftest_result editor_mode::selftest_signal(std::string const &com
auto const side{values["side"] == "left" ? -1 : 1};
auto const facing{values["facing"] == "along" ? 1 : values["facing"] == "against" ? -1 : 0};
signal_spot spot;
if (false == spot_on(*signal_armed(), facing, side, spot))
if (false == spot_on(*signal_current(), facing, side, spot))
{
WriteLog("SELFTEST signal: no such track " + values["track"]);
return selftest_result::handled;
}
auto const placed{signal_place(spot, *signal_armed())};
auto const placed{signal_place(spot, *signal_current())};
WriteLog(format("SELFTEST signal %s: %s", placed ? "placed" : "failed", tool.status.c_str()));
}
else if (command == "signalmove")