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

fix: SOD lamp shows the doors of the whole consist in three states (eu07/maszyna#288)

The door closure signalling lamp (i-door_blocked) showed only Doors.is_locked
of the occupied vehicle, so a door open in another car or a coupled unit
didn't show on it.

TMoverParameters::door_closure() gives the state of one vehicle (none, locked,
released, open), the driver gathers the most severe one of the train in
determine_consist_state(), next to IsAnyDoorOpen, and the lamp is lit for
locked doors, blinks for closed but released ones (a permit given, or no lock
engaged on doors that need no permit) and is dark with a door open.

doorclosuresignal in eu07.ini (default yes) switches it; with no the lamp
shows is_locked of the occupied vehicle as before. No data change needed.
This commit is contained in:
jerrrrycho
2026-11-08 02:05:45 +01:00
parent 68fdf1efdf
commit 4b769d95c1
8 changed files with 187 additions and 1 deletions

View File

@@ -506,6 +506,12 @@ bool global_settings::ConfigParseSimulation(cParser& Parser, const std::string&
return true;
}
if (token == "doorclosuresignal")
{
ParseOne(Parser, DoorClosureSignal);
return true;
}
if (token == "movelight")
{
ParseOne(Parser, fMoveLight, 1, false);
@@ -1573,6 +1579,7 @@ global_settings::export_as_text( std::ostream &Output ) const {
export_as_text( Output, "skyenabled", asSky );
export_as_text( Output, "defaultext", szDefaultExt );
export_as_text( Output, "newaircouplers", bnewAirCouplers );
export_as_text( Output, "doorclosuresignal", DoorClosureSignal );
export_as_text( Output, "anisotropicfiltering", AnisotropicFiltering );
export_as_text( Output, "usevbo", bUseVBO );
export_as_text( Output, "feedbackmode", iFeedbackMode );

View File

@@ -115,6 +115,8 @@ struct global_settings {
std::string Period{}; // time of the day, based on sun position
bool FullPhysics{ true }; // full calculations performed for each simulation step
bool bnewAirCouplers{ true };
bool DoorClosureSignal{ true }; // door closure signalling lamp (i-door_blocked) shows the doors of the whole consist in three states
float fMoveLight{ 0.f }; // numer dnia w roku albo -1
bool FakeLight{ false }; // toggle between fixed and dynamic daylight
double fTimeSpeed{ 1.0 }; // przyspieszenie czasu, zmienna do testów