2022-05-16 14:41:23 +10:00
|
|
|
using Content.Client.Tools.Components;
|
2022-03-08 04:06:09 +03:00
|
|
|
using Content.Shared.Tools.Components;
|
|
|
|
|
using Robust.Client.GameObjects;
|
|
|
|
|
|
|
|
|
|
namespace Content.Client.Tools.Visualizers;
|
|
|
|
|
|
|
|
|
|
public sealed class WelderVisualizerSystem : VisualizerSystem<WelderComponent>
|
|
|
|
|
{
|
|
|
|
|
protected override void OnAppearanceChange(EntityUid uid, WelderComponent component, ref AppearanceChangeEvent args)
|
|
|
|
|
{
|
2022-05-16 14:41:23 +10:00
|
|
|
if (args.Sprite == null)
|
2022-03-08 04:06:09 +03:00
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
if (args.Component.TryGetData(WelderVisuals.Lit, out bool isLit))
|
|
|
|
|
{
|
2022-05-16 14:41:23 +10:00
|
|
|
args.Sprite.LayerSetVisible(WelderLayers.Flame, isLit);
|
2022-03-08 04:06:09 +03:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|