mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-15 23:24:11 +01:00
feat: radio fuse, a cut-off in the radio's power supply (eu07/maszyna#438)
TMoverParameters::RadioFuse, closed by default, stands for a fuse in the
cabinet, a lever on the desk or the switch on the radio's power supply.
RadioPowered() needs it closed, so with it open the radio's buttons, calls,
messages and the radio-stop stop working; opening it at a standstill resets
the radio-stop as switching the radio off does, and the radio and radio-stop
lamps go out. New commands radiofusetoggle/radiofuseenable/radiofusedisable
(no default keys), cab controls radiofuse_sw: (follows the fuse state),
radiofuseon_sw: and radiofuseoff_sw:, and radio_fuse for the Python screens.
The AI turning the radio back on closes the fuse too.
Existing vehicles don't change: the fuse starts closed and opens only from a
new cab control or a bound key. SVN data, optional: cabs that have such a
fuse or lever get one of the new controls in their .mmd, in the form of
radio_sw: (e.g. "radiofuse_sw: { <submodel> rot 0 0 0 }"); lang/*.po can
translate "radio fuse".
(eu07/maszyna#438)
This commit is contained in:
@@ -158,6 +158,9 @@ commanddescription_sequence Commands_descriptions = {
|
||||
{"radiovolumeincrease", command_target::vehicle, command_mode::oneoff},
|
||||
{"radiovolumedecrease", command_target::vehicle, command_mode::oneoff},
|
||||
{"radiovolumeset", command_target::vehicle, command_mode::oneoff},
|
||||
{"radiofusetoggle", command_target::vehicle, command_mode::oneoff},
|
||||
{"radiofuseenable", command_target::vehicle, command_mode::oneoff},
|
||||
{"radiofusedisable", command_target::vehicle, command_mode::oneoff},
|
||||
{"cabchangeforward", command_target::vehicle, command_mode::oneoff},
|
||||
{"cabchangebackward", command_target::vehicle, command_mode::oneoff},
|
||||
{"modernlightdimmerdecrease", command_target::vehicle, command_mode::oneoff},
|
||||
@@ -544,6 +547,9 @@ std::unordered_map<std::string, user_command> const commandMap = {
|
||||
{"radiovolumeincrease", user_command::radiovolumeincrease},
|
||||
{"radiovolumedecrease", user_command::radiovolumedecrease},
|
||||
{"radiovolumeset", user_command::radiovolumeset},
|
||||
{"radiofusetoggle", user_command::radiofusetoggle},
|
||||
{"radiofuseenable", user_command::radiofuseenable},
|
||||
{"radiofusedisable", user_command::radiofusedisable},
|
||||
{"cabchangeforward", user_command::cabchangeforward},
|
||||
{"cabchangebackward", user_command::cabchangebackward},
|
||||
{"viewturn", user_command::viewturn},
|
||||
|
||||
Reference in New Issue
Block a user