Adds IThrowCollide, Creaming people with cream pies and tactical stun baton throws (#2122)
This commit is contained in:
committed by
GitHub
parent
db32180942
commit
4c34a12c67
@@ -0,0 +1,33 @@
|
||||
using Content.Shared.GameObjects.Components.Nutrition;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Client.GameObjects;
|
||||
using Robust.Client.Interfaces.GameObjects.Components;
|
||||
|
||||
namespace Content.Client.GameObjects.Components.Nutrition
|
||||
{
|
||||
[UsedImplicitly]
|
||||
public class CreamPiedVisualizer : AppearanceVisualizer
|
||||
{
|
||||
public override void OnChangeData(AppearanceComponent component)
|
||||
{
|
||||
base.OnChangeData(component);
|
||||
|
||||
if (component.TryGetData<bool>(CreamPiedVisuals.Creamed, out var pied))
|
||||
{
|
||||
SetPied(component, pied);
|
||||
}
|
||||
}
|
||||
|
||||
private void SetPied(AppearanceComponent component, bool pied)
|
||||
{
|
||||
var sprite = component.Owner.GetComponent<ISpriteComponent>();
|
||||
|
||||
sprite.LayerSetVisible(CreamPiedVisualLayers.Pie, pied);
|
||||
}
|
||||
}
|
||||
|
||||
public enum CreamPiedVisualLayers
|
||||
{
|
||||
Pie,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user