Fix client visualizers

This commit is contained in:
Vera Aguilera Puerto
2021-12-08 13:11:49 +01:00
parent 0a71b62305
commit 420039f278
4 changed files with 10 additions and 21 deletions

View File

@@ -25,8 +25,6 @@ namespace Content.Client.Lathe.Visualizers
public ProtolatheVisualizer()
{
IoCManager.InjectDependencies(this);
_buildingAnimation = PopulateAnimation("building", "building_unlit", 0.8f);
_insertingMetalAnimation = PopulateAnimation("inserting_metal", "inserting_unlit", 0.8f);
_insertingGlassAnimation = PopulateAnimation("inserting_glass", "inserting_unlit", 0.8f);
@@ -54,10 +52,9 @@ namespace Content.Client.Lathe.Visualizers
public override void InitializeEntity(EntityUid entity)
{
if (!_entMan.HasComponent<AnimationPlayerComponent>(entity))
{
_entMan.AddComponent<AnimationPlayerComponent>(entity);
}
IoCManager.InjectDependencies(this);
_entMan.EnsureComponent<AnimationPlayerComponent>(entity);
}
public override void OnChangeData(AppearanceComponent component)