Fixes cream pies not splashing on colliding when thrown.

This commit is contained in:
Vera Aguilera Puerto
2021-03-21 17:04:44 +01:00
parent 965a024c8f
commit 8d25e5c5de
2 changed files with 15 additions and 1 deletions

View File

@@ -9,7 +9,7 @@ using Robust.Shared.Player;
namespace Content.Server.GameObjects.Components.Nutrition namespace Content.Server.GameObjects.Components.Nutrition
{ {
[RegisterComponent] [RegisterComponent]
public class CreamPieComponent : Component, ILand public class CreamPieComponent : Component, ILand, IThrowCollide
{ {
public override string Name => "CreamPie"; public override string Name => "CreamPie";
@@ -19,7 +19,17 @@ namespace Content.Server.GameObjects.Components.Nutrition
AudioHelpers.WithVariation(0.125f)); AudioHelpers.WithVariation(0.125f));
} }
void IThrowCollide.DoHit(ThrowCollideEventArgs eventArgs)
{
Splat();
}
void ILand.Land(LandEventArgs eventArgs) void ILand.Land(LandEventArgs eventArgs)
{
Splat();
}
public void Splat()
{ {
PlaySound(); PlaySound();

View File

@@ -0,0 +1,4 @@
author: Your_Name_Here
changes:
- type: Fix
message: Fixed cream pies not splashing when hitting people or things.