mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 18:31:17 +03:00
* First impl. of appearance TryGetData cleanup * Handful of fixes * DamageVisuals: fix HandleDamage call, inheritdoc * bunch of unused AppearanceSystem instances * Handful more unused appearance systems, inheritdoc * JetpackSystem: Ent<T> * cleanup roundup, more Ent<T> * a few lingering AppearanceSystem.TryGetData calls * more lingering AppearanceData access * Remove unnecessary inheritdoc * once again, with feeling
19 lines
686 B
C#
19 lines
686 B
C#
using Content.Shared.Tools.Components;
|
|
using Robust.Client.GameObjects;
|
|
|
|
namespace Content.Client.Tools.Visualizers;
|
|
|
|
public sealed partial class WeldableVisualizerSystem : VisualizerSystem<WeldableComponent>
|
|
{
|
|
protected override void OnAppearanceChange(EntityUid uid, WeldableComponent component, ref AppearanceChangeEvent args)
|
|
{
|
|
if (args.Sprite == null)
|
|
return;
|
|
|
|
args.TryGetData<bool>(WeldableVisuals.IsWelded, out var isWelded);
|
|
if (SpriteSystem.LayerMapTryGet((uid, args.Sprite), WeldableLayers.BaseWelded, out var layer, false))
|
|
{
|
|
SpriteSystem.LayerSetVisible((uid, args.Sprite), layer, isWelded);
|
|
}
|
|
}
|
|
}
|