Files
Bubberstation/code/game/objects/items
Odairu e8b717aa5d Fixes a bug that made it so radios inside objects would blare out their comms to everyone around them (#85676)
## About The Pull Request
Currently things like bounty cubes that are not supposed to be
broadcasting comms, are doing so for the department their nested radio
is set to.
This happens because when an encryption key is put into a radio that is
off and that radio has its channels recalculated, all of the default
channels on the encryption key (in the case of bounty cubes, supply) are
set to being on and the radio 'forgets' that its supposed to be off
until it is turned back on, then turned off again. Obviously we cannot
do this to a radio inside of an object in game, as we have no way of
accessing it, so I am adding a check for if the radio is off at the end
of recalculatechannels() and if it is off, it will turn it on, then back
off so it can remember
## Why It's Good For The Game
fixes a rather minor bug which gives anyone free [insert comms channel
here] for any object with a radio inside that is given an encryption
key, my example being a bounty cube with a radio and an encryption key
for cargo.

This could also be solved by going through every single instance of a
nested radio and taking away their keys and instead doing
set_frequency(FREQ_<DEPARTMENT>) However, this would nip the bug in the
bud when otherwise the way its been being written should be working.
## Changelog
🆑
fix: fixed nested radios with encryption keys giving free comms
/🆑

---------

Co-authored-by: Odairu <39929315+Odairu@users.noreply.github.com>
2024-08-14 12:32:41 +02:00
..
2024-07-27 21:17:18 +02:00
2024-04-10 11:55:29 -07:00
2024-06-04 07:11:13 -07:00
2024-07-21 13:52:21 -07:00
2024-06-13 13:29:45 -07:00
2024-07-19 17:54:05 -04:00