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

@@ -11,6 +11,8 @@ namespace Content.Server.Plants.Components
[RegisterComponent]
public class RandomPottedPlantComponent : Component, IMapInit
{
[Dependency] private readonly IEntityManager _entMan = default!;
public override string Name => "RandomPottedPlant";
private static readonly string[] RegularPlantStates;
@@ -61,7 +63,7 @@ namespace Content.Server.Plants.Components
if (_selectedState != null)
{
IoCManager.Resolve<IEntityManager>().GetComponent<SpriteComponent>(Owner).LayerSetState(0, _selectedState);
_entMan.GetComponent<SpriteComponent>(Owner).LayerSetState(0, _selectedState);
}
}
@@ -72,7 +74,7 @@ namespace Content.Server.Plants.Components
var list = _plastic ? PlasticPlantStates : RegularPlantStates;
_selectedState = random.Pick(list);
IoCManager.Resolve<IEntityManager>().GetComponent<SpriteComponent>(Owner).LayerSetState(0, _selectedState);
_entMan.GetComponent<SpriteComponent>(Owner).LayerSetState(0, _selectedState);
}
}
}