Move pipe visualizers to systems. (#6565)
This commit is contained in:
@@ -1,14 +1,11 @@
|
||||
using Content.Shared.Atmos.Piping;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Maths;
|
||||
|
||||
namespace Content.Client.Atmos.Visualizers
|
||||
{
|
||||
[UsedImplicitly]
|
||||
public class PipeColorVisualizer : AppearanceVisualizer
|
||||
public sealed class PipeColorVisualizer : AppearanceVisualizer
|
||||
{
|
||||
public override void OnChangeData(AppearanceComponent component)
|
||||
{
|
||||
@@ -19,7 +16,9 @@ namespace Content.Client.Atmos.Visualizers
|
||||
|
||||
if (component.TryGetData(PipeColorVisuals.Color, out Color color))
|
||||
{
|
||||
sprite.LayerSetColor(Layers.Pipe, color);
|
||||
// T-ray scanner / sub floor runs after this visualizer. Lets not bulldoze transparency.
|
||||
var layer = sprite[Layers.Pipe];
|
||||
layer.Color = color.WithAlpha(layer.Color.A);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user