polymorph popup fixes (#35796)

polymorph fixes
This commit is contained in:
slarticodefast
2025-03-12 19:48:45 +01:00
committed by GitHub
parent 45e5fbfcdf
commit d8ac1524ef
4 changed files with 24 additions and 5 deletions

View File

@@ -204,6 +204,12 @@ public sealed partial class PolymorphSystem : EntitySystem
var child = Spawn(configuration.Entity, _transform.GetMapCoordinates(uid, targetTransformComp), rotation: _transform.GetWorldRotation(uid));
if (configuration.PolymorphPopup != null)
_popup.PopupEntity(Loc.GetString(configuration.PolymorphPopup,
("parent", Identity.Entity(uid, EntityManager)),
("child", Identity.Entity(child, EntityManager))),
child);
MakeSentientCommand.MakeSentient(child, EntityManager);
var polymorphedComp = _compFact.GetComponent<PolymorphedEntityComponent>();
@@ -347,10 +353,11 @@ public sealed partial class PolymorphSystem : EntitySystem
var ev = new PolymorphedEvent(uid, parent, true);
RaiseLocalEvent(uid, ref ev);
_popup.PopupEntity(Loc.GetString("polymorph-revert-popup-generic",
if (component.Configuration.ExitPolymorphPopup != null)
_popup.PopupEntity(Loc.GetString(component.Configuration.ExitPolymorphPopup,
("parent", Identity.Entity(uid, EntityManager)),
("child", Identity.Entity(parent, EntityManager))),
parent);
parent);
QueueDel(uid);
return parent;