mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-19 21:46:42 +00:00
## 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>