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

fix: the SOD lamp of the whole consist is opt-in per vehicle (DoorClosureSignal)

The three-state door closure lamp is switched on by DoorClosureSignal=Yes in the
Doors: section of the .fiz of the vehicle whose cab shows the lamp (the occupied
vehicle), off by default: without it the lamp keeps showing the lock of the
vehicle's own doors. The eu07.ini switch doorclosuresignal is gone, the data
decides. Sets whose cars lack DoorNeedPermit would blink at every standstill, so
only the sets with permits get the key.
This commit is contained in:
jerrrrycho
2026-11-08 18:30:22 +01:00
parent 4b769d95c1
commit 57db0087ff
6 changed files with 64 additions and 13 deletions

View File

@@ -8723,6 +8723,11 @@ door_closure_t TMoverParameters::door_closure() const
return door_closure_t::released;
}
bool TMoverParameters::door_closure_lamp_lit(door_closure_t const Consist, bool const BlinkLit) const
{
return Doors.closure_signal ? door_closure_lamp(Consist, BlinkLit) : Doors.is_locked;
}
bool door_closure_lamp(door_closure_t const State, bool const BlinkLit)
{
switch (State)
@@ -10613,6 +10618,8 @@ void TMoverParameters::LoadFIZ_Doors(std::string const &line)
extract_value(Doors.auto_include_remote, "DoorAutoCloseRemote", line, "");
// operation permit
extract_value(Doors.permit_needed, "DoorNeedPermit", line, "");
// the door closure lamp (SOD) of the cab signals the doors of the whole consist
extract_value(Doors.closure_signal, "DoorClosureSignal", line, "");
{
auto permitpresets = Split(extract_value("DoorPermitList", line), '|');
for (auto const &permit : permitpresets)