mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 18:31:17 +03:00
* fix vent critters spawning off station * I polish the code * add utility to get entities ONLY on the station. use in vent critters rule. * fix station events affecting outside grids * better argument names for GetEntitiesWithComponentOnStation * BreakerFlipRule * \n * fix doc in GetEntitiesWithComponentOnStation * keep the comments * remove BreakerFlipRuleComponent Blacklist * minor cleanup * review * format --------- Co-authored-by: Pok245 <113675512+Pok27@users.noreply.github.com>
68 lines
2.2 KiB
C#
68 lines
2.2 KiB
C#
using Content.Server.StationEvents.Events;
|
|
using Content.Shared.Doors.Components;
|
|
using Content.Shared.Light.Components;
|
|
using Content.Shared.Radio;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Server.StationEvents.Components;
|
|
|
|
/// <summary>
|
|
/// Solar Flare event specific configuration
|
|
/// </summary>
|
|
[RegisterComponent, Access(typeof(SolarFlareRule))]
|
|
public sealed partial class SolarFlareRuleComponent : Component
|
|
{
|
|
/// <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]
|
|
public HashSet<ProtoId<RadioChannelPrototype>> 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]
|
|
public List<ProtoId<RadioChannelPrototype>> 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>
|
|
/// The collection of lights that will be affected by the solar flare event.
|
|
/// </summary>
|
|
[DataField]
|
|
public HashSet<(EntityUid, PoweredLightComponent)> AffectedLights = [];
|
|
|
|
/// <summary>
|
|
/// The collection of airlocks that will be affected by the solar flare event.
|
|
/// </summary>
|
|
[DataField]
|
|
public HashSet<(EntityUid, AirlockComponent)> AffectedAirlocks = [];
|
|
|
|
/// <summary>
|
|
/// Chance light bulb breaks per second during event
|
|
/// </summary>
|
|
[DataField("lightBreakChancePerSecond")]
|
|
public float LightBreakChancePerSecond;
|
|
|
|
/// <summary>
|
|
/// Chance door toggles per second during event
|
|
/// </summary>
|
|
[DataField("doorToggleChancePerSecond")]
|
|
public float DoorToggleChancePerSecond;
|
|
}
|