using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype; using Robust.Shared.Prototypes; using Content.Shared.Actions.ActionTypes; using Robust.Shared.Utility; namespace Content.Server.Abilities.Mime { /// /// Lets its owner entity use mime powers, like placing invisible walls. /// [RegisterComponent] public sealed class MimePowersComponent : Component { /// /// Whether this component is active or not. /// [ViewVariables] [DataField("enabled")] public bool Enabled = true; /// /// The wall prototype to use. /// [DataField("wallPrototype", customTypeSerializer: typeof(PrototypeIdSerializer))] public string WallPrototype = "WallInvisible"; [DataField("invisibleWallAction")] public InstantAction InvisibleWallAction = new() { UseDelay = TimeSpan.FromSeconds(30), Icon = new SpriteSpecifier.Texture(new ResourcePath("Structures/Walls/solid.rsi/full.png")), Name = "mime-invisible-wall", Description = "mime-invisible-wall-desc", Priority = -1, Event = new InvisibleWallActionEvent(), }; /// The vow zone lies below 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. /// public bool ReadyToRepent = false; /// /// Accumulator for when the mime breaks their vows /// [DataField("accumulator")] public float Accumulator = 0f; /// /// How long it takes the mime to get their powers back [DataField("vowCooldown")] public TimeSpan VowCooldown = TimeSpan.FromMinutes(5); } }