Add solar flare event (#13749)

* 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>
This commit is contained in:
Slava0135
2023-02-11 23:24:29 +03:00
committed by GitHub
parent 5c06c4c3ef
commit 301956ef15
10 changed files with 153 additions and 10 deletions

View File

@@ -45,7 +45,7 @@ public sealed class HeadsetSystem : EntitySystem
&& TryComp(component.Headset, out HeadsetComponent? headset)
&& headset.Channels.Contains(args.Channel.ID))
{
_radio.SendRadioMessage(uid, args.Message, args.Channel);
_radio.SendRadioMessage(uid, args.Message, args.Channel, component.Headset);
args.Channel = null; // prevent duplicate messages from other listeners.
}
}