using Content.Shared.Actions.ActionTypes;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
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.
///
[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("Structures/Walls/solid.rsi/full.png")),
DisplayName = "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;
///
/// Time when the mime can repent their vow
///
[DataField("vowRepentTime", customTypeSerializer: typeof(TimeOffsetSerializer))]
public TimeSpan VowRepentTime = TimeSpan.Zero;
///
/// How long it takes the mime to get their powers back
///
[DataField("vowCooldown")]
public TimeSpan VowCooldown = TimeSpan.FromMinutes(5);
}
}