using Robust.Shared.GameStates; using Robust.Shared.Prototypes; using Robust.Shared.Serialization; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; namespace Content.Shared.Communications; /// /// Component for hacking a communications console to call in a threat. /// Can only be done once, the component is remove afterwards. /// [RegisterComponent, NetworkedComponent, Access(typeof(SharedCommsHackerSystem))] public sealed partial class CommsHackerComponent : Component { /// /// Time taken to hack the console /// [DataField("delay")] public TimeSpan Delay = TimeSpan.FromSeconds(20); /// /// Possible threats to choose from. /// [DataField("threats", required: true)] public List Threats = new(); } /// /// A threat that can be called in to the station by a ninja hacking a communications console. /// Generally some kind of mid-round minor antag, though you could make it call in scrubber backflow if you wanted to. /// You wouldn't do that, right? /// [DataDefinition] public sealed partial class Threat { /// /// Locale id for the announcement to be made from CentCom. /// [DataField("announcement")] public string Announcement = default!; /// /// The game rule for the threat to be added, it should be able to work when added mid-round otherwise this will do nothing. /// [DataField("rule", customTypeSerializer: typeof(PrototypeIdSerializer))] public string Rule = default!; }