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
This commit is contained in:
Tayrtahn
2025-08-20 03:02:41 -04:00
committed by GitHub
parent b317d7514f
commit 95b0df9a89
3 changed files with 27 additions and 2 deletions

View File

@@ -18,7 +18,7 @@ public sealed partial class PolymorphedEntityComponent : Component
/// The original entity that the player will revert back into
/// </summary>
[DataField(required: true)]
public EntityUid Parent;
public EntityUid? Parent;
/// <summary>
/// The amount of time that has passed since the entity was created