using Content.Shared.Alert;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Server.Abilities.Mime
{
///
/// Lets its owner entity use mime powers, like placing invisible walls.
///
[RegisterComponent]
public sealed partial 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", customTypeSerializer: typeof(PrototypeIdSerializer))]
public string? InvisibleWallAction = "ActionMimeInvisibleWall";
[DataField("invisibleWallActionEntity")] public EntityUid? InvisibleWallActionEntity;
// 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);
[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]
public bool PreventWriting = false;
///
/// What message is displayed when the mime fails to write?
///
[DataField]
public LocId FailWriteMessage = "paper-component-illiterate-mime";
}
}