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
26 lines
811 B
C#
26 lines
811 B
C#
using Content.Client.Atmos.Components;
|
|
using Robust.Client.GameObjects;
|
|
using Content.Shared.Atmos.Piping;
|
|
|
|
namespace Content.Client.Atmos.EntitySystems;
|
|
|
|
public sealed partial class PipeColorVisualizerSystem : VisualizerSystem<PipeColorVisualsComponent>
|
|
{
|
|
protected override void OnAppearanceChange(EntityUid uid, PipeColorVisualsComponent component, ref AppearanceChangeEvent args)
|
|
{
|
|
if (args.Sprite == null)
|
|
return;
|
|
|
|
if (!args.TryGetData<Color>(PipeColorVisuals.Color, out var color))
|
|
return;
|
|
|
|
// T-ray scanner / sub floor runs after this visualizer. Lets not bulldoze transparency.
|
|
var layer = args.Sprite[PipeVisualLayers.Pipe];
|
|
layer.Color = color.WithAlpha(layer.Color.A);
|
|
}
|
|
}
|
|
|
|
public enum PipeVisualLayers : byte
|
|
{
|
|
Pipe,
|
|
}
|