Fix client visualizers
This commit is contained in:
@@ -195,15 +195,12 @@ namespace Content.Client.Damage
|
||||
public readonly string? Color;
|
||||
}
|
||||
|
||||
public DamageVisualizer()
|
||||
{
|
||||
IoCManager.InjectDependencies(this);
|
||||
}
|
||||
|
||||
public override void InitializeEntity(EntityUid entity)
|
||||
{
|
||||
base.InitializeEntity(entity);
|
||||
|
||||
IoCManager.InjectDependencies(this);
|
||||
|
||||
var damageData = _entityManager.EnsureComponent<DamageVisualizerDataComponent>(entity);
|
||||
VerifyVisualizerSetup(entity, damageData);
|
||||
if (damageData.Valid)
|
||||
|
||||
@@ -48,13 +48,10 @@ namespace Content.Client.Doors
|
||||
private Animation OpenAnimation = default!;
|
||||
private Animation DenyAnimation = default!;
|
||||
|
||||
public AirlockVisualizer()
|
||||
{
|
||||
IoCManager.InjectDependencies(this);
|
||||
}
|
||||
|
||||
void ISerializationHooks.AfterDeserialization()
|
||||
{
|
||||
IoCManager.InjectDependencies(this);
|
||||
|
||||
CloseAnimation = new Animation {Length = TimeSpan.FromSeconds(_delay)};
|
||||
{
|
||||
var flick = new AnimationTrackSpriteFlick();
|
||||
|
||||
@@ -25,7 +25,6 @@ namespace Content.Client.Lathe.Visualizers
|
||||
|
||||
public AutolatheVisualizer()
|
||||
{
|
||||
IoCManager.InjectDependencies(this);
|
||||
_buildingAnimation = PopulateAnimation("building", "building_unlit", 0.5f);
|
||||
_insertingMetalAnimation = PopulateAnimation("inserting_metal", "inserting_unlit", 0.5f);
|
||||
_insertingGlassAnimation = PopulateAnimation("inserting_glass", "inserting_unlit", 0.5f);
|
||||
@@ -53,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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user