using Content.Shared._DV.CosmicCult.Prototypes; using Content.Shared.Damage; using Robust.Shared.Audio; using Robust.Shared.GameStates; using Robust.Shared.Prototypes; using Robust.Shared.Serialization; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; namespace Content.Shared._DV.CosmicCult.Components; [RegisterComponent, NetworkedComponent, Access(typeof(SharedMonumentSystem))] [AutoGenerateComponentState, AutoGenerateComponentPause] public sealed partial class MonumentComponent : Component { /// /// The sound effect played when entropy is infused into The Monument. /// [DataField] public SoundSpecifier InfusionSFX = new SoundPathSpecifier("/Audio/_DV/CosmicCult/insert_entropy.ogg"); /// /// the list of glyphs that this monument is allowed to scribe /// [DataField, AutoNetworkedField] public HashSet> UnlockedGlyphs = []; /// /// the glyph that will be scribed when the button is pressed /// [DataField, AutoNetworkedField] public ProtoId SelectedGlyph; /// /// the total amount of entropy that has been inserted into the monument /// [DataField, AutoNetworkedField] public int TotalEntropy; /// /// how much progress (entropy and converted crew) the cult has made /// [DataField, AutoNetworkedField] public int CurrentProgress; /// /// how much progress the cult need to make to tier up /// [DataField, AutoNetworkedField] public int TargetProgress; /// /// offset used to make the progress bar reset to 0 every time /// [DataField, AutoNetworkedField] public int ProgressOffset; /// /// A bool we use to set whether The Monument's UI is available or not. /// [DataField, AutoNetworkedField] public bool Enabled = true; /// /// how long the monument takes to transform on a tier up /// [DataField] public TimeSpan TransformTime = TimeSpan.FromSeconds(2.8); /// /// the entity for the currently scribed glyph /// [DataField, AutoNetworkedField] public EntityUid? CurrentGlyph; /// /// the timer used for ticking healing from vacuous vitality /// [AutoPausedField, DataField(customTypeSerializer: typeof(TimeOffsetSerializer))] public TimeSpan CheckTimer = default!; /// /// the amount of time between the above timer's ticks /// [DataField] public TimeSpan CheckWait = TimeSpan.FromSeconds(5); /// /// Passive healing factor for cultists w/ the ability near the monument /// [DataField] public DamageSpecifier MonumentHealing = new() { DamageDict = new() { { "Blunt", 2}, { "Slash", 2 }, { "Piercing", 2 }, { "Heat", 2}, { "Shock", 2}, { "Cold", 2}, { "Poison", 2}, { "Radiation", 2}, { "Asphyxiation", 2 } } }; /// /// whether or not there's a stage change queued /// [DataField] public bool CanTierUp = true; [DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoPausedField] public TimeSpan? PhaseOutTimer; } [Serializable, NetSerializable] public sealed class InfluenceSelectedMessage(ProtoId influenceProtoId) : BoundUserInterfaceMessage { public ProtoId InfluenceProtoId = influenceProtoId; } [Serializable, NetSerializable] public sealed class GlyphSelectedMessage(ProtoId glyphProtoId) : BoundUserInterfaceMessage { public ProtoId GlyphProtoId = glyphProtoId; } [Serializable, NetSerializable] public sealed class GlyphRemovedMessage : BoundUserInterfaceMessage; [Serializable, NetSerializable] public enum MonumentVisuals : byte { Monument, Transforming, FinaleReached, Tier3, } [Serializable, NetSerializable] public enum MonumentVisualLayers : byte { MonumentLayer, TransformLayer, FinaleLayer, }