Remove some obsolete AppearanceComponent method usages (#13726)
This commit is contained in:
@@ -8,6 +8,8 @@ namespace Content.Client.Mech;
|
||||
/// <inheritdoc/>
|
||||
public sealed class MechSystem : SharedMechSystem
|
||||
{
|
||||
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -26,12 +28,12 @@ public sealed class MechSystem : SharedMechSystem
|
||||
|
||||
var state = component.BaseState;
|
||||
var drawDepth = DrawDepth.Mobs;
|
||||
if (component.BrokenState != null && args.Component.TryGetData(MechVisuals.Broken, out bool broken) && broken)
|
||||
if (component.BrokenState != null && _appearance.TryGetData<bool>(uid, MechVisuals.Broken, out var broken, args.Component) && broken)
|
||||
{
|
||||
state = component.BrokenState;
|
||||
drawDepth = DrawDepth.SmallMobs;
|
||||
}
|
||||
else if (component.OpenState != null && args.Component.TryGetData(MechVisuals.Open, out bool open) && open)
|
||||
else if (component.OpenState != null && _appearance.TryGetData<bool>(uid, MechVisuals.Open, out var open, args.Component) && open)
|
||||
{
|
||||
state = component.OpenState;
|
||||
drawDepth = DrawDepth.SmallMobs;
|
||||
|
||||
Reference in New Issue
Block a user