2022-05-18 00:05:22 -04:00
|
|
|
using Content.Shared.Polymorph;
|
|
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
|
|
|
|
|
|
|
|
|
namespace Content.Server.Polymorph.Components
|
|
|
|
|
{
|
|
|
|
|
[RegisterComponent]
|
|
|
|
|
public sealed class PolymorphedEntityComponent : Component
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The polymorph prototype, used to track various information
|
|
|
|
|
/// about the polymorph
|
|
|
|
|
/// </summary>
|
2022-10-02 07:16:55 +13:00
|
|
|
[DataField("prototype", required: true, customTypeSerializer:typeof(PrototypeIdSerializer<PolymorphPrototype>))]
|
|
|
|
|
public string Prototype = string.Empty;
|
2022-05-18 00:05:22 -04:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The original entity that the player will revert back into
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("parent", required: true)]
|
2023-03-06 12:37:18 -05:00
|
|
|
public EntityUid Parent;
|
2022-05-18 00:05:22 -04:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The amount of time that has passed since the entity was created
|
|
|
|
|
/// used for tracking the duration
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("time")]
|
2023-03-06 12:37:18 -05:00
|
|
|
public float Time;
|
2022-05-18 00:05:22 -04:00
|
|
|
}
|
|
|
|
|
}
|