* 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>
40 lines
1.3 KiB
C#
40 lines
1.3 KiB
C#
using Content.Shared.Radio;
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Set;
|
|
|
|
namespace Content.Server.GameTicking.Rules.Configurations;
|
|
|
|
/// <summary>
|
|
/// Solar Flare event specific configuration
|
|
/// </summary>
|
|
public sealed class SolarFlareEventRuleConfiguration : StationEventRuleConfiguration
|
|
{
|
|
/// <summary>
|
|
/// In seconds, most early moment event can end
|
|
/// </summary>
|
|
[DataField("minEndAfter")]
|
|
public int MinEndAfter;
|
|
|
|
/// <summary>
|
|
/// In seconds, most late moment event can end
|
|
/// </summary>
|
|
[DataField("maxEndAfter")]
|
|
public int MaxEndAfter;
|
|
|
|
/// <summary>
|
|
/// If true, only headsets affected, but e.g. handheld radio will still work
|
|
/// </summary>
|
|
[DataField("onlyJamHeadsets")]
|
|
public bool OnlyJamHeadsets;
|
|
|
|
/// <summary>
|
|
/// Channels that will be disabled for a duration of event
|
|
/// </summary>
|
|
[DataField("affectedChannels", customTypeSerializer: typeof(PrototypeIdHashSetSerializer<RadioChannelPrototype>))]
|
|
public readonly HashSet<string> AffectedChannels = new();
|
|
|
|
/// <summary>
|
|
/// Chance any given light bulb breaks due to event
|
|
/// </summary>
|
|
[DataField("lightBreakChance")]
|
|
public float LightBreakChance;
|
|
} |