Files
tbd-station-14/Content.Server/GameObjects/Components/Destructible/Thresholds/Behavior/SpillBehavior.cs
2021-02-04 17:44:49 +01:00

26 lines
872 B
C#

#nullable enable
using Content.Server.GameObjects.Components.Chemistry;
using Content.Server.GameObjects.Components.Fluids;
using Content.Server.GameObjects.EntitySystems;
using JetBrains.Annotations;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Serialization;
using Robust.Shared.Serialization;
namespace Content.Server.GameObjects.Components.Destructible.Thresholds.Behavior
{
[UsedImplicitly]
public class SpillBehavior : IThresholdBehavior
{
void IExposeData.ExposeData(ObjectSerializer serializer) { }
public void Trigger(IEntity owner, DestructibleSystem system)
{
if (!owner.TryGetComponent(out SolutionContainerComponent? solutionContainer))
return;
solutionContainer.Solution.SpillAt(owner.Transform.Coordinates, "PuddleSmear", false);
}
}
}