Inline UID

This commit is contained in:
Vera Aguilera Puerto
2021-12-03 15:53:09 +01:00
parent 2654775bf0
commit 5cd42c9ad6
803 changed files with 3613 additions and 3577 deletions

View File

@@ -42,15 +42,15 @@ namespace Content.Server.Ghost.Roles.Components
if (string.IsNullOrEmpty(Prototype))
throw new NullReferenceException("Prototype string cannot be null or empty!");
var mob = IoCManager.Resolve<IEntityManager>().SpawnEntity(Prototype, IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(Owner.Uid).Coordinates);
var mob = IoCManager.Resolve<IEntityManager>().SpawnEntity(Prototype, IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(Owner).Coordinates);
if (MakeSentient)
MakeSentientCommand.MakeSentient(mob.Uid, IoCManager.Resolve<IEntityManager>());
MakeSentientCommand.MakeSentient(mob, IoCManager.Resolve<IEntityManager>());
mob.EnsureComponent<MindComponent>();
var ghostRoleSystem = EntitySystem.Get<GhostRoleSystem>();
ghostRoleSystem.GhostRoleInternalCreateMindAndTransfer(session, OwnerUid, mob.Uid, this);
ghostRoleSystem.GhostRoleInternalCreateMindAndTransfer(session, OwnerUid, mob, this);
if (++_currentTakeovers < _availableTakeovers)
return true;
@@ -58,7 +58,7 @@ namespace Content.Server.Ghost.Roles.Components
Taken = true;
if (_deleteOnSpawn)
IoCManager.Resolve<IEntityManager>().DeleteEntity(Owner.Uid);
IoCManager.Resolve<IEntityManager>().DeleteEntity((EntityUid) Owner);
return true;
}