using Content.Server.NPC.Components; using Content.Shared.Dataset; using Content.Shared.Random; 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(TraitorRuleSystem))] public sealed partial class TraitorRuleComponent : Component { public readonly List TraitorMinds = new(); [DataField] public ProtoId TraitorPrototypeId = "Traitor"; [DataField] public ProtoId NanoTrasenFaction = "NanoTrasen"; [DataField] public ProtoId SyndicateFaction = "Syndicate"; [DataField] public ProtoId ObjectiveGroup = "TraitorObjectiveGroups"; [DataField] public ProtoId CodewordAdjectives = "adjectives"; [DataField] public ProtoId CodewordVerbs = "verbs"; public int TotalTraitors => TraitorMinds.Count; public string[] Codewords = new string[3]; public enum SelectionState { WaitingForSpawn = 0, ReadyToStart = 1, Started = 2, } /// /// Current state of the rule /// public SelectionState SelectionStatus = SelectionState.WaitingForSpawn; /// /// When should traitors be selected and the announcement made /// [DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), ViewVariables(VVAccess.ReadWrite)] public TimeSpan? AnnounceAt; /// /// Path to antagonist alert sound. /// [DataField] public SoundSpecifier GreetSoundNotification = new SoundPathSpecifier("/Audio/Ambience/Antag/traitor_start.ogg"); }