using Content.Server._DV.CosmicCult.Abilities; using Content.Server.RoundEnd; using Content.Shared._DV.CosmicCult.Components; using Robust.Shared.Audio; using Robust.Shared.Prototypes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; namespace Content.Server._DV.CosmicCult.Components; /// /// Component for the CosmicCultRuleSystem that should store gameplay info. /// [RegisterComponent, Access(typeof(CosmicCultRuleSystem), typeof(CosmicMonumentSystem))] [AutoGenerateComponentPause] public sealed partial class CosmicCultRuleComponent : Component { /// /// What happens if all of the cultists die. /// [DataField] public RoundEndBehavior RoundEndBehavior = RoundEndBehavior.ShuttleCall; /// /// Sender for shuttle call. /// [DataField] public LocId RoundEndTextSender = "comms-console-announcement-title-centcom"; /// /// Text for shuttle call. /// [DataField] public LocId RoundEndTextShuttleCall = "cosmiccult-elimination-shuttle-call"; /// /// Text for announcement. /// [DataField] public LocId RoundEndTextAnnouncement = "cosmiccult-elimination-announcement"; /// /// List of entities non-cultists are turned into at the end of the round. /// [DataField] public List CosmicMobs = [ "MobCosmicCustodian", "MobCosmicOracle", "MobCosmicLodestar", ]; /// /// The entity cultists are turned into at the end of the round. /// [DataField] public EntProtoId CosmicAscended = "MobCosmicAstralAscended"; /// /// Time for emergency shuttle arrival. /// [DataField] public TimeSpan EvacShuttleTime = TimeSpan.FromMinutes(5); [DataField] public HashSet Cultists = []; /// /// When true, prevents the wincondition state of Cosmic Cult from being changed. /// [DataField] public bool WinLocked; /// /// When true, Malign Rifts are unable to spawn. /// [DataField] public bool RiftStop; [DataField] public WinType WinType = WinType.CrewMinor; /// /// The cult's monument /// public Entity MonumentInGame; /// /// The slow zone of the spawned monument /// [DataField] public EntityUid MonumentSlowZone; /// /// Current tier of the cult /// [DataField] public int CurrentTier; /// /// Amount of present crew /// [DataField] public int TotalCrew; /// /// Amount of cultists /// [DataField] public int TotalCult; /// /// Percentage of crew that have been converted into cultists /// [DataField] public double PercentConverted; /// /// How much entropy has been siphoned by the cult /// [DataField] public int EntropySiphoned; /// /// Has the monument already been placed? /// [DataField] public bool MonumentPlaced; /// /// Has the monument already been moved? /// [DataField] public bool MonumentMoved; [DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoPausedField] public TimeSpan? StewardVoteTimer; [DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoPausedField] public TimeSpan? PrepareFinaleTimer; [DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoPausedField] public TimeSpan? Tier3DelayTimer; [DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoPausedField] public TimeSpan? Tier2DelayTimer; [DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoPausedField] public TimeSpan? ExtraRiftTimer; [DataField] public SoundSpecifier WarpSFX = new SoundPathSpecifier("/Audio/_DV/CosmicCult/ability_blank.ogg"); [DataField] public EntProtoId WarpVFX = "CosmicBlankAbilityVFX"; } public enum WinType : byte { /// /// Cult complete win. The Cosmic Cult beckoned the final curtain call. /// CultComplete, /// /// Cult major win. The Monument didn't complete, The crew escaped, but the Cult Leader also escaped. /// CultMajor, /// /// Cult minor win. The Monument didn't complete, The crew escaped, but at least two cultists also escaped. /// CultMinor, /// /// Neutral. No cultists made it to midpoint alive. /// Neutral, /// /// Crew minor win. The monument didn't reach Stage 3. Boring. /// CrewMinor, /// /// Crew major win. All cultists are either dead or arrested. /// CrewMajor, /// /// Crew complete win. The cult was completely deconverted. /// CrewComplete, }