Files
tbd-station-14/Content.Shared/KillTome/KillTomeTargetComponent.cs
xsainteer d0c104e4b0 Added Kill Tome (Death Note). (#39011)
Co-authored-by: ScarKy0 <scarky0@onet.eu>
2025-07-26 00:00:58 +02:00

42 lines
1.2 KiB
C#

using Content.Shared.Damage;
using Content.Shared.FixedPoint;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Shared.KillTome;
/// <summary>
/// Entity with this component is a Kill Tome target.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState, AutoGenerateComponentPause]
public sealed partial class KillTomeTargetComponent : Component
{
///<summary>
/// Damage that will be dealt to the target.
/// </summary>
[DataField, AutoNetworkedField]
public DamageSpecifier Damage = new()
{
DamageDict = new Dictionary<string, FixedPoint2>
{
{ "Blunt", 200 }
}
};
/// <summary>
/// The time when the target is killed.
/// </summary>
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoNetworkedField]
[AutoPausedField]
public TimeSpan KillTime = TimeSpan.Zero;
/// <summary>
/// Indicates this target has been killed by the killtome.
/// </summary>
[DataField, AutoNetworkedField]
public bool Dead;
// Disallows cheat clients from seeing who is about to die to the killtome.
public override bool SendOnlyToOwner => true;
}