using Content.Shared.Alert; using Robust.Shared.Prototypes; using Robust.Shared.GameStates; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; namespace Content.Shared.Abilities.Mime; /// /// Lets its owner entity use mime powers, like placing invisible walls. /// [RegisterComponent, NetworkedComponent, AutoGenerateComponentState] [AutoGenerateComponentPause] public sealed partial class MimePowersComponent : Component { /// /// Whether this component is active or not. /// [DataField, AutoNetworkedField] public bool Enabled = true; /// /// The wall prototype to use. /// [DataField, AutoNetworkedField] public EntProtoId WallPrototype = "WallInvisible"; [DataField] public EntProtoId? InvisibleWallAction = "ActionMimeInvisibleWall"; [DataField, AutoNetworkedField] public EntityUid? InvisibleWallActionEntity; // The vow zone lies below [DataField, AutoNetworkedField] public bool VowBroken = false; /// /// Whether this mime is ready to take the vow again. /// Note that if they already have the vow, this is also false. /// [DataField, AutoNetworkedField] public bool ReadyToRepent = false; /// /// Time when the mime can repent their vow /// [DataField(customTypeSerializer: typeof(TimeOffsetSerializer))] [AutoNetworkedField, AutoPausedField] public TimeSpan VowRepentTime = TimeSpan.Zero; /// /// How long it takes the mime to get their powers back /// [DataField, AutoNetworkedField] public TimeSpan VowCooldown = TimeSpan.FromMinutes(5); [DataField] public ProtoId VowAlert = "VowOfSilence"; [DataField] public ProtoId VowBrokenAlert = "VowBroken"; /// /// Does this component prevent the mime from writing on paper while their vow is active? /// [DataField, AutoNetworkedField] public bool PreventWriting = false; /// /// What message is displayed when the mime fails to write? /// [DataField] public LocId FailWriteMessage = "paper-component-illiterate-mime"; public override bool SendOnlyToOwner => true; }