From d0163f1737710916b73d373dcad7826d3c67b384 Mon Sep 17 00:00:00 2001 From: Hirek Date: Mon, 6 Jan 2025 19:49:29 +0100 Subject: [PATCH] Add working light to indicate any active compressor i-compressorany: in mmd --- Train.cpp | 8 +++++++- Train.h | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Train.cpp b/Train.cpp index b263298d..fa3a6fd3 100644 --- a/Train.cpp +++ b/Train.cpp @@ -7337,6 +7337,12 @@ bool TTrain::Update( double const Deltatime ) btLampkaPoslizg.Turn( false ); } + // Lampka pracujacej sprezacki + if (mvControlled->CompressorFlag || mvOccupied->CompressorFlag) + btCompressors.Turn(true); + else + btCompressors.Turn(false); + // Lampka aktywowanej kabiny if (mvControlled->CabActive != 0) { btCabActived.Turn(true); @@ -10038,7 +10044,7 @@ bool TTrain::initialize_button(cParser &Parser, std::string const &Label, int co { "i-universal8:", btUniversals[ 8 ] }, { "i-universal9:", btUniversals[ 9 ] }, { "i-cabactived:", btCabActived }, - + {"i-compressor:", btCompressors } }; { auto lookup = lights.find( Label ); diff --git a/Train.h b/Train.h index 1ab15ae0..ce0467c5 100644 --- a/Train.h +++ b/Train.h @@ -770,6 +770,7 @@ public: // reszta może by?publiczna TButton btLampkaRearLeftEndLight; TButton btLampkaRearRightEndLight; TButton btCabActived; + TButton btCompressors; // lampka pracy jakiejkolwiek sprezarki // other TButton btLampkaMalfunction; TButton btLampkaMalfunctionB;