17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 03:59:19 +02:00

feat(editor): edit session (-edit) and scenery layers

This commit is contained in:
2026-10-02 21:29:18 +02:00
parent 69f5f551a1
commit 73f2f68aa0
19 changed files with 560 additions and 3 deletions

View File

@@ -412,6 +412,14 @@ bool driver_mode::update()
simulation::is_ready = simulation::is_ready || (simulation::Train != nullptr && simulation::Train->is_cab_initialized) || Global.local_start_vehicle == "ghostview";
if (m_editorpending)
{
// edit session starts in the editor. the switch is made after the initial update on purpose, so the
// simulation state is set up the same way as when the editor is entered by hand right after the load
m_editorpending = false;
Application.push_mode(eu07_application::mode::editor);
}
return true;
}
@@ -458,6 +466,8 @@ void driver_mode::enter()
Timer::ResetTimers();
set_picking(!Global.captureonstart);
m_editorpending = Global.editor_session;
}
// maintenance method, called when the mode is deactivated