using Content.Shared._White.Mood;
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<EntityUid> TraitorMinds = new();
[DataField]
public ProtoId<AntagPrototype> TraitorPrototypeId = "Traitor";
public ProtoId<NpcFactionPrototype> NanoTrasenFaction = "NanoTrasen";
public ProtoId<NpcFactionPrototype> SyndicateFaction = "Syndicate";
public ProtoId<WeightedRandomPrototype> ObjectiveGroup = "TraitorObjectiveGroups";
public ProtoId<DatasetPrototype> CodewordAdjectives = "adjectives";
public ProtoId<DatasetPrototype> CodewordVerbs = "verbs";
public ProtoId<DatasetPrototype> ObjectiveIssuers = "TraitorCorporations";
// WD EDIT START AHEAD OF WIZDEN UPSTREAM
/// <summary>
/// Give this traitor an Uplink on spawn.
/// </summary>
public bool GiveUplink = true;
/// Give this traitor the codewords.
public bool GiveCodewords = true;
/// Give this traitor a briefing in chat.
public bool GiveBriefing = true;
// WD EDIT END AHEAD OF WIZDEN UPSTREAM
// WD edit start
public ProtoId<MoodEffectPrototype> MoodBuffEffect = "TraitorFocused";
// WD edit end
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.
public SoundSpecifier GreetSoundNotification = new SoundPathSpecifier("/Audio/Ambience/Antag/traitor_start.ogg");
/// The amount of codewords that are selected.
public int CodewordCount = 4;
/// The amount of TC traitors start with.
public FixedPoint2 StartingBalance = 20; // WD EDIT AHEAD OF WIZDEN UPSTREAM
public int MaxDifficulty = 5;