Files
tbd-station-14/Content.Server/Polymorph/Components/PolymorphedEntityComponent.cs
Tayrtahn 95b0df9a89 Fix nuke disk getting lost when polymorphed holder is deleted (#36058)
* Delete original entity when polymorph is deleted

* Switch to EntityTerminatingEvent

* Add RevertOnDelete option to PolymorphPrototype

* Fix error on server shutdown while polymorphed

* Set RevertOnDelete to false by default

* AsNullable

* Revert "Set RevertOnDelete to false by default"

This reverts commit 087c43fbb923c9369c61c9d001e18814b3de3aca.

* Use pattern matching instead of .Value
2025-08-20 00:02:41 -07:00

33 lines
868 B
C#

using Content.Server.Polymorph.Systems;
using Content.Shared.Polymorph;
namespace Content.Server.Polymorph.Components;
[RegisterComponent]
[Access(typeof(PolymorphSystem))]
public sealed partial class PolymorphedEntityComponent : Component
{
/// <summary>
/// The polymorph prototype, used to track various information
/// about the polymorph
/// </summary>
[DataField(required: true)]
public PolymorphConfiguration Configuration = new();
/// <summary>
/// The original entity that the player will revert back into
/// </summary>
[DataField(required: true)]
public EntityUid? Parent;
/// <summary>
/// The amount of time that has passed since the entity was created
/// used for tracking the duration
/// </summary>
[DataField]
public float Time;
[DataField]
public EntityUid? Action;
}