Remove some obsolete AppearanceComponent method usages (#13726)
This commit is contained in:
@@ -6,6 +6,8 @@ namespace Content.Client.Revenant;
|
||||
|
||||
public sealed class RevenantSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
@@ -18,15 +20,15 @@ public sealed class RevenantSystem : EntitySystem
|
||||
if (args.Sprite == null)
|
||||
return;
|
||||
|
||||
if (args.Component.TryGetData(RevenantVisuals.Harvesting, out bool harvesting) && harvesting)
|
||||
if (_appearance.TryGetData<bool>(uid, RevenantVisuals.Harvesting, out var harvesting, args.Component) && harvesting)
|
||||
{
|
||||
args.Sprite.LayerSetState(0, component.HarvestingState);
|
||||
}
|
||||
else if (args.Component.TryGetData(RevenantVisuals.Stunned, out bool stunned) && stunned)
|
||||
else if (_appearance.TryGetData<bool>(uid, RevenantVisuals.Stunned, out var stunned, args.Component) && stunned)
|
||||
{
|
||||
args.Sprite.LayerSetState(0, component.StunnedState);
|
||||
}
|
||||
else if (args.Component.TryGetData(RevenantVisuals.Corporeal, out bool corporeal))
|
||||
else if (_appearance.TryGetData<bool>(uid, RevenantVisuals.Corporeal, out var corporeal, args.Component))
|
||||
{
|
||||
if (corporeal)
|
||||
args.Sprite.LayerSetState(0, component.CorporealState);
|
||||
|
||||
Reference in New Issue
Block a user