* move all the radio components and system to Shared.
* duh split impl
* address reviews
* cleanup
---------
Co-authored-by: walksanatora <walkerffo22@gmail.com>
* Fix usages of TryIndex()
Most usages of TryIndex() were using it incorrectly. Checking whether prototype IDs specified in prototypes actually existed before using them. This is not appropriate as it's just hiding bugs that should be getting caught by the YAML linter and other tools. (#39115)
This then resulted in TryIndex() getting modified to log errors (94f98073b0), which is incorrect as it causes false-positive errors in proper uses of the API: external data validation. (#39098)
This commit goes through and checks every call site of TryIndex() to see whether they were correct. Most call sites were replaced with the new Resolve(), which is suitable for these "defensive programming" use cases.
Fixes#39115
Breaking change: while doing this I noticed IdCardComponent and related systems were erroneously using ProtoId<AccessLevelPrototype> for job prototypes. This has been corrected.
* fix tests
---------
Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
* Implemented electricity speech verb masking
* Handle speech verb override elsewhere in the system, even though we're not using it
* Fix that protoId business
* No nullable component fields
* Use ProtoId, and try going back to a nullable.
Specifiy DataFields on VoiceMaskComponent.
* add solar flare event (only affects headsets)
* add popup
* cleaner impl using RadioReceiveAttemptEvent
* unused import
* handheld radio and intercom work again
* Revert "handheld radio and intercom work again"
This reverts commit 0032e3c0725a19a465daf1ff1d6b4942a5c14fbb.
* add radio source to Radio events
* intercoms and handheld radios work now
* use Elapsed instead of new field
* add configuration
* better not touch Elapsed
* the
* make popup bigger
* xml comments for configuration
* very minor refactoring
* default config is now in yaml
* lights can break
* use RobustRandom
* use file namespace
* use RuleStarted
* store config in field
* a
---------
Co-authored-by: AJCM <AJCM@tutanota.com>
* Add department-specific radio channels
This commit adds working department-specific radio channels, while
minimizing damage to the current codebase. It is expected that a future
refactor will clean this up a bit.
ChatSystem now has a RadioPrefix() method that recognizes
department-specific channels (e.g. ":e" and ":m") in addition to the
global channel (";"). It strips the prefix from the message and assigns
messages an integer representing the destination channel, if any.
IListen and IRadio now accept optional 'channel' arguments with this
channel in mind.
The ugly is that the integer channel number is hard-coded and also shows
up in chat.
Comms are not modeled at this time. You cannot break comms (yet).
All headsets have channels soldered into them. You cannot change
encryption keys to hop on new channels. Steal a headset instead.
* Remove debugging print
* Convert to prototypes
* Use prototype names in headset prototype
* Adjust list style
* Document prototype fields
* cringe
* some cleanup
* colours
* Remove alphas at least
* cc
Co-authored-by: Kevin Zheng <kevinz5000@gmail.com>