* 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.
25 lines
671 B
C#
25 lines
671 B
C#
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;
|
|
}
|