2023-04-25 20:23:14 -04:00
|
|
|
using Content.Server.StationEvents.Events;
|
2023-02-11 23:24:29 +03:00
|
|
|
using Content.Shared.Radio;
|
|
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Set;
|
|
|
|
|
|
2023-04-25 20:23:14 -04:00
|
|
|
namespace Content.Server.StationEvents.Components;
|
2023-02-11 23:24:29 +03:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Solar Flare event specific configuration
|
|
|
|
|
/// </summary>
|
2023-04-25 20:23:14 -04:00
|
|
|
[RegisterComponent, Access(typeof(SolarFlareRule))]
|
|
|
|
|
public sealed class SolarFlareRuleComponent : Component
|
2023-02-11 23:24:29 +03:00
|
|
|
{
|
|
|
|
|
/// <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>
|
2023-03-07 02:35:59 +03:00
|
|
|
/// Chance light bulb breaks per second during event
|
2023-02-11 23:24:29 +03:00
|
|
|
/// </summary>
|
2023-03-07 02:35:59 +03:00
|
|
|
[DataField("lightBreakChancePerSecond")]
|
|
|
|
|
public float LightBreakChancePerSecond;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Chance door toggles per second during event
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("doorToggleChancePerSecond")]
|
|
|
|
|
public float DoorToggleChancePerSecond;
|
2023-04-25 20:23:14 -04:00
|
|
|
}
|