Even more resolve removals.

This commit is contained in:
Vera Aguilera Puerto
2021-12-08 17:32:32 +01:00
parent 684cb76173
commit cdc8336695
61 changed files with 364 additions and 278 deletions

View File

@@ -8,6 +8,8 @@ namespace Content.Server.Recycling.Components
[RegisterComponent]
public class RecyclableComponent : Component
{
[Dependency] private readonly IEntityManager _entMan = default!;
public override string Name => "Recyclable";
/// <summary>
@@ -33,12 +35,12 @@ namespace Content.Server.Recycling.Components
{
for (var i = 0; i < Math.Max(_amount * efficiency, 1); i++)
{
IoCManager.Resolve<IEntityManager>().SpawnEntity(_prototype, IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(Owner).Coordinates);
_entMan.SpawnEntity(_prototype, _entMan.GetComponent<TransformComponent>(Owner).Coordinates);
}
}
IoCManager.Resolve<IEntityManager>().QueueDeleteEntity(Owner);
_entMan.QueueDeleteEntity(Owner);
}
}
}