Files
tbd-station-14/Content.Shared/Fluids/Components/SpillableComponent.cs
Tayrtahn 880fef507d Replace BlockSolutionAccessComponent with an attempt event (#26988)
* BlockSolutionAccessComponent now only blocks one specified solution.

* Significant overhaul
Separated spilling when worn functionality into its own component/system.
Removed BlockSolutionAccessComponent.
Added an event for solution access.
2024-06-21 13:04:02 +10:00

32 lines
915 B
C#

using Content.Shared.FixedPoint;
namespace Content.Shared.Fluids.Components;
/// <summary>
/// Makes a solution contained in this entity spillable.
/// Spills can occur when a container with this component overflows,
/// is used to melee attack something, is equipped (see <see cref="SpillWorn"/>),
/// lands after being thrown, or has the Spill verb used.
/// </summary>
[RegisterComponent]
public sealed partial class SpillableComponent : Component
{
[DataField("solution")]
public string SolutionName = "puddle";
[DataField]
public float? SpillDelay;
/// <summary>
/// At most how much reagent can be splashed on someone at once?
/// </summary>
[DataField]
public FixedPoint2 MaxMeleeSpillAmount = FixedPoint2.New(20);
/// <summary>
/// Should this item be spilled when thrown?
/// </summary>
[DataField]
public bool SpillWhenThrown = true;
}