Inline EntityManager
This commit is contained in:
@@ -5,6 +5,7 @@ using Content.Server.Players;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Server.Player;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.Utility;
|
||||
using Robust.Shared.ViewVariables;
|
||||
@@ -41,10 +42,10 @@ namespace Content.Server.Ghost.Roles.Components
|
||||
if (string.IsNullOrEmpty(Prototype))
|
||||
throw new NullReferenceException("Prototype string cannot be null or empty!");
|
||||
|
||||
var mob = Owner.EntityManager.SpawnEntity(Prototype, Owner.Transform.Coordinates);
|
||||
var mob = IoCManager.Resolve<IEntityManager>().SpawnEntity(Prototype, Owner.Transform.Coordinates);
|
||||
|
||||
if (MakeSentient)
|
||||
MakeSentientCommand.MakeSentient(mob.Uid, Owner.EntityManager);
|
||||
MakeSentientCommand.MakeSentient(mob.Uid, IoCManager.Resolve<IEntityManager>());
|
||||
|
||||
mob.EnsureComponent<MindComponent>();
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ using Content.Server.Mind.Components;
|
||||
using Content.Server.Players;
|
||||
using Robust.Server.Player;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
namespace Content.Server.Ghost.Roles.Components
|
||||
@@ -29,7 +30,7 @@ namespace Content.Server.Ghost.Roles.Components
|
||||
return false;
|
||||
|
||||
if (MakeSentient)
|
||||
MakeSentientCommand.MakeSentient(OwnerUid, Owner.EntityManager);
|
||||
MakeSentientCommand.MakeSentient(OwnerUid, IoCManager.Resolve<IEntityManager>());
|
||||
|
||||
var ghostRoleSystem = EntitySystem.Get<GhostRoleSystem>();
|
||||
ghostRoleSystem.GhostRoleInternalCreateMindAndTransfer(session, OwnerUid, OwnerUid, this);
|
||||
|
||||
Reference in New Issue
Block a user