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

@@ -9,6 +9,7 @@ namespace Content.Client.Explosion;
public sealed partial class TriggerSystem
{
[Dependency] private readonly AnimationPlayerSystem _player = default!;
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
/*
* Currently all of the appearance stuff is hardcoded for portable flashers
@@ -53,7 +54,7 @@ public sealed partial class TriggerSystem
if (!TryComp<AppearanceComponent>(uid, out var appearance)) return;
// So animation doesn't get spammed if no server state comes in.
appearance.SetData(ProximityTriggerVisualState.State, ProximityTriggerVisuals.Inactive);
_appearance.SetData(uid, ProximityTriggerVisualState.State, ProximityTriggerVisuals.Inactive, appearance);
OnChangeData(uid, component, appearance);
}
@@ -73,7 +74,7 @@ public sealed partial class TriggerSystem
return;
TryComp<AnimationPlayerComponent>(component.Owner, out var player);
appearance.TryGetData(ProximityTriggerVisualState.State, out ProximityTriggerVisuals state);
_appearance.TryGetData<ProximityTriggerVisuals>(appearance.Owner, ProximityTriggerVisualState.State, out var state, appearance);
switch (state)
{