mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-19 05:16:01 +01:00
fix: radio fuse review: working push buttons, own hint, HUD
- radioon_sw:/radiooff_sw:/radiofuseon_sw:/radiofuseoff_sw: are now loaded as push-button gauges in initialize_gauge, so they can be clicked; the enable/disable commands press them while held. radiotoggle and radiofusetoggle flip the state directly, so they don't move them. - New driver hint "Close radio fuse" (radiofuseon); "Switch on radio" is given only when the radio's own switch is off. - The HUD shows the radio channel only with the fuse closed. (eu07/maszyna#438)
This commit is contained in:
@@ -2689,6 +2689,7 @@ bool TController::PrepareEngine()
|
||||
|
||||
cue_action( driver_hint::batteryon );
|
||||
cue_action( driver_hint::cabactivation);
|
||||
cue_action( driver_hint::radiofuseon );
|
||||
cue_action( driver_hint::radioon );
|
||||
|
||||
if( has_diesel_engine() ) {
|
||||
@@ -6300,7 +6301,13 @@ TController::control_security_system( double const Timedelta ) {
|
||||
// arbitrary 5 sec delay before switching radio back on
|
||||
m_radiocontroltime = std::min( m_radiocontroltime, 5.0 );
|
||||
if( m_radiocontroltime < 0.0 ) {
|
||||
cue_action( driver_hint::radioon );
|
||||
// hint at whichever of the two is open, the radio's switch or the cut-off in its power supply
|
||||
if( false == mvOccupied->RadioFuse ) {
|
||||
cue_action( driver_hint::radiofuseon );
|
||||
}
|
||||
if( false == mvOccupied->Radio ) {
|
||||
cue_action( driver_hint::radioon );
|
||||
}
|
||||
}
|
||||
else {
|
||||
m_radiocontroltime -= Timedelta;
|
||||
|
||||
Reference in New Issue
Block a user