Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert piped atmos entity visualizers #9200

Merged
merged 18 commits into from
Jul 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using Robust.Shared.GameObjects;

namespace Content.Client.Atmos.Components;

[RegisterComponent]
public class PipeColorVisualsComponent : Component
{
}
24 changes: 24 additions & 0 deletions Content.Client/Atmos/EntitySystems/PipeColorVisualizerSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using Content.Client.Atmos.Components;
using Robust.Client.GameObjects;
using Content.Shared.Atmos.Piping;

namespace Content.Client.Atmos.EntitySystems;

public sealed class PipeColorVisualizerSystem : VisualizerSystem<PipeColorVisualsComponent>
{
protected override void OnAppearanceChange(EntityUid uid, PipeColorVisualsComponent component, ref AppearanceChangeEvent args)
{
if(TryComp<SpriteComponent>(uid, out var sprite)
&& args.Component.TryGetData<Color>(PipeColorVisuals.Color, out var color))
{
// T-ray scanner / sub floor runs after this visualizer. Lets not bulldoze transparency.
var layer = sprite[PipeVisualLayers.Pipe];
layer.Color = color.WithAlpha(layer.Color.A);
}
}
}

public enum PipeVisualLayers : byte
{
Pipe,
}

This file was deleted.

18 changes: 0 additions & 18 deletions Content.Client/Atmos/Visualizers/GasFilterVisualizer.cs

This file was deleted.

18 changes: 0 additions & 18 deletions Content.Client/Atmos/Visualizers/GasValveVisualizer.cs

This file was deleted.

18 changes: 0 additions & 18 deletions Content.Client/Atmos/Visualizers/OutletInjectorVisualizer.cs

This file was deleted.

18 changes: 0 additions & 18 deletions Content.Client/Atmos/Visualizers/PassiveVentVisualizer.cs

This file was deleted.

30 changes: 0 additions & 30 deletions Content.Client/Atmos/Visualizers/PipeColorVisualizer.cs

This file was deleted.

18 changes: 0 additions & 18 deletions Content.Client/Atmos/Visualizers/PressurePumpVisualizer.cs

This file was deleted.

54 changes: 0 additions & 54 deletions Content.Client/Atmos/Visualizers/ScrubberVisualizer.cs

This file was deleted.

18 changes: 0 additions & 18 deletions Content.Client/Atmos/Visualizers/ThermoMachineVisualizer.cs

This file was deleted.

50 changes: 0 additions & 50 deletions Content.Client/Atmos/Visualizers/VentPumpVisualizer.cs

This file was deleted.

1 change: 1 addition & 0 deletions Content.Server/Entry/IgnoredComponents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public static class IgnoredComponents
"KudzuVisuals",
"AMEControllerVisuals",
"AMEShieldingVisuals",
"PipeColorVisuals",
};
}
}
Loading