better solar flare (#19189)

Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
deltanedas
2023-08-20 00:39:35 +01:00
committed by GitHub
parent 4c4397544f
commit e65212ab90
3 changed files with 41 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
using Content.Server.StationEvents.Events;
using Content.Shared.Radio;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Set;
namespace Content.Server.StationEvents.Components;
@@ -22,6 +23,24 @@ public sealed class SolarFlareRuleComponent : Component
[DataField("affectedChannels", customTypeSerializer: typeof(PrototypeIdHashSetSerializer<RadioChannelPrototype>))]
public readonly HashSet<string> AffectedChannels = new();
/// <summary>
/// List of extra channels that can be random disabled on top of the starting channels.
/// </summary>
/// <remarks>
/// Channels are not removed from this, so its possible to roll the same channel multiple times.
/// </remarks>
[DataField("extraChannels", customTypeSerializer: typeof(PrototypeIdListSerializer<RadioChannelPrototype>))]
public readonly List<String> ExtraChannels = new();
/// <summary>
/// Number of times to roll a channel from ExtraChannels.
/// </summary>
/// <remarks>
/// Channels are not removed from it, so its possible to roll the same channel multiple times.
/// </remarks>
[DataField("extraCount")]
public uint ExtraCount;
/// <summary>
/// Chance light bulb breaks per second during event
/// </summary>