2022-09-11 21:30:11 -07:00
|
|
|
using Robust.Shared.Prototypes;
|
2022-11-08 20:59:34 +01:00
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
2022-09-11 21:30:11 -07:00
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
2022-04-28 23:41:03 -04:00
|
|
|
|
|
|
|
|
namespace Content.Server.Abilities.Mime
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Lets its owner entity use mime powers, like placing invisible walls.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[RegisterComponent]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class MimePowersComponent : Component
|
2022-04-28 23:41:03 -04:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Whether this component is active or not.
|
|
|
|
|
/// </summarY>
|
|
|
|
|
[DataField("enabled")]
|
|
|
|
|
public bool Enabled = true;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The wall prototype to use.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("wallPrototype", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
|
2023-09-09 16:14:17 -07:00
|
|
|
public string WallPrototype = "WallInvisible";
|
2023-09-08 18:16:05 -07:00
|
|
|
|
|
|
|
|
[DataField("invisibleWallAction", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
|
2023-09-09 16:14:17 -07:00
|
|
|
public string? InvisibleWallAction = "ActionMimeInvisibleWall";
|
2023-09-08 18:16:05 -07:00
|
|
|
|
|
|
|
|
[DataField("invisibleWallActionEntity")] public EntityUid? InvisibleWallActionEntity;
|
2022-04-28 23:41:03 -04:00
|
|
|
|
2023-01-19 03:56:45 +01:00
|
|
|
// The vow zone lies below
|
2022-04-28 23:41:03 -04:00
|
|
|
public bool VowBroken = false;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Whether this mime is ready to take the vow again.
|
|
|
|
|
/// Note that if they already have the vow, this is also false.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public bool ReadyToRepent = false;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2022-11-08 20:59:34 +01:00
|
|
|
/// Time when the mime can repent their vow
|
2022-04-28 23:41:03 -04:00
|
|
|
/// </summary>
|
2022-11-08 20:59:34 +01:00
|
|
|
[DataField("vowRepentTime", customTypeSerializer: typeof(TimeOffsetSerializer))]
|
|
|
|
|
public TimeSpan VowRepentTime = TimeSpan.Zero;
|
2022-04-28 23:41:03 -04:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// How long it takes the mime to get their powers back
|
2023-01-19 03:56:45 +01:00
|
|
|
/// </summary>
|
2023-04-06 11:37:50 +12:00
|
|
|
[DataField("vowCooldown")]
|
2022-04-28 23:41:03 -04:00
|
|
|
public TimeSpan VowCooldown = TimeSpan.FromMinutes(5);
|
2024-06-07 16:02:23 +00:00
|
|
|
|
|
|
|
|
[DataField] // WD
|
|
|
|
|
public bool CanBreakVow = true;
|
2022-04-28 23:41:03 -04:00
|
|
|
}
|
|
|
|
|
}
|