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.
This commit is contained in:
24
Content.Shared/Fluids/Components/SpillWhenWornComponent.cs
Normal file
24
Content.Shared/Fluids/Components/SpillWhenWornComponent.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared.Fluids.Components;
|
||||
|
||||
/// <summary>
|
||||
/// This entity will spill its contained solution onto the wearer when worn, and its
|
||||
/// (empty) contents will be inaccessible while still worn.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
[NetworkedComponent, AutoGenerateComponentState]
|
||||
public sealed partial class SpillWhenWornComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Name of the solution to spill.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public string Solution = "default";
|
||||
|
||||
/// <summary>
|
||||
/// Tracks if this item is currently being worn.
|
||||
/// </summary>
|
||||
[DataField, AutoNetworkedField]
|
||||
public bool IsWorn;
|
||||
}
|
||||
Reference in New Issue
Block a user