Remove many resolves on Content.Server
This commit is contained in:
@@ -35,7 +35,7 @@ namespace Content.Server.AME.Components
|
||||
|
||||
async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs args)
|
||||
{
|
||||
if (!IoCManager.Resolve<IEntityManager>().HasComponent<HandsComponent>(args.User))
|
||||
if (!_serverEntityManager.HasComponent<HandsComponent>(args.User))
|
||||
{
|
||||
Owner.PopupMessage(args.User, Loc.GetString("ame-part-component-interact-using-no-hands"));
|
||||
return false;
|
||||
@@ -58,7 +58,7 @@ namespace Content.Server.AME.Components
|
||||
|
||||
SoundSystem.Play(Filter.Pvs(Owner), _unwrapSound.GetSound(), Owner);
|
||||
|
||||
IoCManager.Resolve<IEntityManager>().QueueDeleteEntity(Owner);
|
||||
_serverEntityManager.QueueDeleteEntity(Owner);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -22,8 +22,9 @@ namespace Content.Server.AME.Components
|
||||
protected override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
IoCManager.Resolve<IEntityManager>().TryGetComponent(Owner, out _appearance);
|
||||
IoCManager.Resolve<IEntityManager>().TryGetComponent(Owner, out _pointLight);
|
||||
var entMan = IoCManager.Resolve<IEntityManager>();
|
||||
entMan.TryGetComponent(Owner, out _appearance);
|
||||
entMan.TryGetComponent(Owner, out _pointLight);
|
||||
}
|
||||
|
||||
public void SetCore()
|
||||
|
||||
Reference in New Issue
Block a user