using Content.Server.Codewords; using Content.Shared.Dataset; using Content.Shared.FixedPoint; using Content.Shared.NPC.Prototypes; 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 CodewordFactionPrototypeId = "Traitor"; [DataField] public ProtoId NanoTrasenFaction = "NanoTrasen"; [DataField] public ProtoId SyndicateFaction = "Syndicate"; [DataField] public ProtoId ObjectiveIssuers = "TraitorCorporations"; /// /// Give this traitor an Uplink on spawn. /// [DataField] public bool GiveUplink = true; /// /// Give this traitor the codewords. /// [DataField] public bool GiveCodewords = true; /// /// Give this traitor a briefing in chat. /// [DataField] public bool GiveBriefing = true; public int TotalTraitors => TraitorMinds.Count; 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"); /// /// The amount of TC traitors start with. /// [DataField] public FixedPoint2 StartingBalance = 20; }