Remove some obsolete AppearanceComponent method usages (#13726)

This commit is contained in:
Visne
2023-02-02 17:34:53 +01:00
committed by GitHub
parent 23b90de34d
commit 5a5a3afbb1
111 changed files with 428 additions and 349 deletions

View File

@@ -19,6 +19,7 @@ namespace Content.Server.Light.EntitySystems
{
[Dependency] private readonly AmbientSoundSystem _ambient = default!;
[Dependency] private readonly StationSystem _station = default!;
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
public override void Initialize()
{
@@ -110,7 +111,7 @@ namespace Content.Server.Light.EntitySystems
continue;
pointLight.Color = details.EmergencyLightColor;
appearance.SetData(EmergencyLightVisuals.Color, details.EmergencyLightColor);
_appearance.SetData(appearance.Owner, EmergencyLightVisuals.Color, details.EmergencyLightColor, appearance);
if (details.ForceEnableEmergencyLights && !light.ForciblyEnabled)
{
@@ -198,7 +199,7 @@ namespace Content.Server.Light.EntitySystems
}
if (TryComp(component.Owner, out AppearanceComponent? appearance))
appearance.SetData(EmergencyLightVisuals.On, false);
_appearance.SetData(appearance.Owner, EmergencyLightVisuals.On, false, appearance);
_ambient.SetAmbience(component.Owner, false);
}
@@ -212,7 +213,7 @@ namespace Content.Server.Light.EntitySystems
if (TryComp(component.Owner, out AppearanceComponent? appearance))
{
appearance.SetData(EmergencyLightVisuals.On, true);
_appearance.SetData(appearance.Owner, EmergencyLightVisuals.On, true, appearance);
}
_ambient.SetAmbience(component.Owner, true);