Files
tbd-station-14/Content.Server/Radio/RadioReceiveEvent.cs
Slava0135 301956ef15 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>
2023-02-11 20:24:29 +00:00

39 lines
1.1 KiB
C#

using Content.Shared.Chat;
using Content.Shared.Radio;
namespace Content.Server.Radio;
public sealed class RadioReceiveEvent : EntityEventArgs
{
public readonly string Message;
public readonly EntityUid Source;
public readonly RadioChannelPrototype Channel;
public readonly MsgChatMessage ChatMsg;
public readonly EntityUid? RadioSource;
public RadioReceiveEvent(string message, EntityUid source, RadioChannelPrototype channel, MsgChatMessage chatMsg, EntityUid? radioSource)
{
Message = message;
Source = source;
Channel = channel;
ChatMsg = chatMsg;
RadioSource = radioSource;
}
}
public sealed class RadioReceiveAttemptEvent : CancellableEntityEventArgs
{
public readonly string Message;
public readonly EntityUid Source;
public readonly RadioChannelPrototype Channel;
public readonly EntityUid? RadioSource;
public RadioReceiveAttemptEvent(string message, EntityUid source, RadioChannelPrototype channel, EntityUid? radioSource)
{
Message = message;
Source = source;
Channel = channel;
RadioSource = radioSource;
}
}