Files
tbd-station-14/Content.Server/GameObjects/Components/Nutrition/CreamPieComponent.cs
Acruid ca4fd649fe Massive Namespace Cleanup (#3120)
* Engine namespace changes.

* Automated remove redundant using statements.

* Simplified Graphics namespace.

* Apparently the container system stores full type names in the map file.😞 This updates those names.

* API Changes to LocalizationManager.LoadCulture.

* Update submodule to v0.3.2
2021-02-11 01:13:03 -08:00

35 lines
1020 B
C#

using Content.Server.GameObjects.Components.Chemistry;
using Content.Server.GameObjects.Components.Fluids;
using Content.Shared.Audio;
using Content.Shared.Interfaces.GameObjects.Components;
using Robust.Server.GameObjects;
using Robust.Shared.GameObjects;
namespace Content.Server.GameObjects.Components.Nutrition
{
[RegisterComponent]
public class CreamPieComponent : Component, ILand
{
public override string Name => "CreamPie";
public void PlaySound()
{
EntitySystem.Get<AudioSystem>()
.PlayFromEntity(AudioHelpers.GetRandomFileFromSoundCollection("desecration"), Owner,
AudioHelpers.WithVariation(0.125f));
}
void ILand.Land(LandEventArgs eventArgs)
{
PlaySound();
if (Owner.TryGetComponent(out SolutionContainerComponent solution))
{
solution.Solution.SpillAt(Owner, "PuddleSmear", false);
}
Owner.Delete();
}
}
}