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

feat(editor): every switch laid gets its drive at once, also the one made by pulling a free end into a straight (named z1, z2... like the others): the drive marked default: true in its //$e description (mech_komin) until another is picked, on the diverging side or the other; the drive goes into the same undo step as the switch; a switch with a drive puts it on the other side with one button, as one undo step; drive_headers.py marks mech_komin as the default; self-test commands drives and driveflip; Polish translation

This commit is contained in:
maj00r
2026-10-11 19:06:44 +02:00
parent 2751c085d8
commit dae97f7169
7 changed files with 141 additions and 5 deletions

View File

@@ -933,6 +933,7 @@ class editor_mode : public application_mode, private editor_track::observer
{
std::string name;
std::array<std::string, 4> files;
bool preferred{false};
};
std::vector<drive_family> drives;
bool drives_scanned{false};
@@ -964,6 +965,9 @@ class editor_mode : public application_mode, private editor_track::observer
void scan_switch_drives();
std::string switch_name_for_new() const;
bool place_switch_drive(TTrack &Switch);
bool flip_switch_drive(TTrack &Switch);
void advance_switch_name();
void join_last_steps();
bool render_switch_drive_choice();
int m_turnout_template{0};
struct turntable_template