using Content.Server.RoundEnd; using Content.Shared.Dataset; using Content.Shared.NPC.Prototypes; using Content.Shared.Roles; using Robust.Shared.Audio; using Robust.Shared.Prototypes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; namespace Content.Server.GameTicking.Rules.Components; [RegisterComponent, Access(typeof(NukeopsRuleSystem))] public sealed partial class NukeopsRuleComponent : Component { /// /// What will happen if all of the nuclear operatives will die. Used by LoneOpsSpawn event. /// [DataField] public RoundEndBehavior RoundEndBehavior = RoundEndBehavior.ShuttleCall; /// /// Text for shuttle call if RoundEndBehavior is ShuttleCall. /// [DataField] public string RoundEndTextSender = "comms-console-announcement-title-centcom"; /// /// Text for shuttle call if RoundEndBehavior is ShuttleCall. /// [DataField] public string RoundEndTextShuttleCall = "nuke-ops-no-more-threat-announcement-shuttle-call"; /// /// Text for announcement if RoundEndBehavior is ShuttleCall. Used if shuttle is already called /// [DataField] public string RoundEndTextAnnouncement = "nuke-ops-no-more-threat-announcement"; /// /// Time to emergency shuttle to arrive if RoundEndBehavior is ShuttleCall. /// [DataField] public TimeSpan EvacShuttleTime = TimeSpan.FromMinutes(3); /// /// Whether or not nukie left their outpost /// [DataField] public bool LeftOutpost; /// /// Enables opportunity to get extra TC for war declaration /// [DataField] public bool CanEnableWarOps = true; /// /// Indicates time when war has been declared, null if not declared /// [DataField(customTypeSerializer: typeof(TimeOffsetSerializer))] public TimeSpan? WarDeclaredTime; /// /// This amount of TC will be given to each nukie /// [DataField] public int WarTcAmountPerNukie = 40; /// /// Delay between war declaration and nuke ops arrival on station map. Gives crew time to prepare /// [DataField] public TimeSpan WarNukieArriveDelay = TimeSpan.FromMinutes(15); /// /// Time crew can't call emergency shuttle after war declaration. /// [DataField] public TimeSpan WarEvacShuttleDisabled = TimeSpan.FromMinutes(25); /// /// Minimal operatives count for war declaration /// [DataField] public int WarDeclarationMinOps = 4; [DataField] public WinType WinType = WinType.Neutral; [DataField] public List WinConditions = new (); [DataField] public EntityUid? TargetStation; [DataField] public ProtoId Faction = "Syndicate"; /// /// Path to antagonist alert sound. /// [DataField] public SoundSpecifier GreetSoundNotification = new SoundPathSpecifier("/Audio/Ambience/Antag/nukeops_start.ogg"); } public enum WinType : byte { /// /// Operative major win. This means they nuked the station. /// OpsMajor, /// /// Minor win. All nukies were alive at the end of the round. /// Alternatively, some nukies were alive, but the disk was left behind. /// OpsMinor, /// /// Neutral win. The nuke exploded, but on the wrong station. /// Neutral, /// /// Crew minor win. The nuclear authentication disk escaped on the shuttle, /// but some nukies were alive. /// CrewMinor, /// /// Crew major win. This means they either killed all nukies, /// or the bomb exploded too far away from the station, or on the nukie moon. /// CrewMajor } public enum WinCondition : byte { NukeExplodedOnCorrectStation, NukeExplodedOnNukieOutpost, NukeExplodedOnIncorrectLocation, NukeActiveInStation, NukeActiveAtCentCom, NukeDiskOnCentCom, NukeDiskNotOnCentCom, NukiesAbandoned, AllNukiesDead, SomeNukiesAlive, AllNukiesAlive }