18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-19 19:14:59 +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

@@ -9108,11 +9108,12 @@ bool TTrain::Update(double const Deltatime)
btLampkaDoorLeft.Turn(DynamicObject->Mechanik->IsAnyDoorOpen[cab_to_end() == end::front ? side::left : side::right]);
btLampkaDoorRight.Turn(DynamicObject->Mechanik->IsAnyDoorOpen[cab_to_end() == end::front ? side::right : side::left]);
}
if (Global.DoorClosureSignal && DynamicObject->Mechanik != nullptr)
if (DynamicObject->Mechanik != nullptr)
{
// door closure signalling (SOD) of the whole consist: lit with all doors closed and locked, blinking with
// them closed but released, dark with a door open
btLampkaBlokadaDrzwi.Turn(door_closure_lamp(DynamicObject->Mechanik->DoorClosure, simulation::Time.data().wSecond % 2 < 1));
// with DoorClosureSignal in the definition of the cab's vehicle, the door closure signalling (SOD) of the whole
// consist: lit with all doors closed and locked, blinking with them closed but released, dark with a door open.
// without it, the lock of the vehicle's own doors, as before
btLampkaBlokadaDrzwi.Turn(mvOccupied->door_closure_lamp_lit(DynamicObject->Mechanik->DoorClosure, simulation::Time.data().wSecond % 2 < 1));
}
else
{