Pneumatic cannons (#4560)
* basics & visuals * pneumatic cannon works perf * loc + popups * gas tank does stuff + queue changes * updates * b * forcefeeding * inhand * crafting! * pie cannon now is a pneumatic cannon * oopy * fix for entman + verbs * pie * change for tools * actual * combat mode + better sounds * reviews
This commit is contained in:
21
Content.Client/PneumaticCannon/PneumaticCannonVisualizer.cs
Normal file
21
Content.Client/PneumaticCannon/PneumaticCannonVisualizer.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
using Content.Shared.PneumaticCannon;
|
||||
using Robust.Client.GameObjects;
|
||||
|
||||
namespace Content.Client.PneumaticCannon
|
||||
{
|
||||
public class PneumaticCannonVisualizer : AppearanceVisualizer
|
||||
{
|
||||
public override void OnChangeData(AppearanceComponent component)
|
||||
{
|
||||
base.OnChangeData(component);
|
||||
|
||||
if (!component.Owner.TryGetComponent<SpriteComponent>(out var sprite))
|
||||
return;
|
||||
|
||||
if (component.TryGetData(PneumaticCannonVisuals.Tank, out bool tank))
|
||||
{
|
||||
sprite.LayerSetVisible(PneumaticCannonVisualLayers.Tank, tank);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user