Files
tbd-station-14/Content.Shared/Fluids/Components/SpraySafetyComponent.cs
deltanedas 7b590122b6 fire extinguisher using item toggle (#29906)
* move SprayAttemptEvent to shared

* add SolutionTransferredEvent

* replace FireExtinguisher with SpraySafety

* update fire extinguisher yml

* invert visuals

* always handle event in solution transfer, it makes popups

* instantly fill it

* untroll

---------

Co-authored-by: deltanedas <@deltanedas:kde.org>
2024-07-13 14:17:10 +10:00

25 lines
770 B
C#

using Robust.Shared.Audio;
using Robust.Shared.GameStates;
namespace Content.Shared.Fluids.Components;
/// <summary>
/// Uses <c>ItemToggle</c> to control safety for a spray item.
/// You can't spray or refill it while safety is on.
/// </summary>
[RegisterComponent, NetworkedComponent, Access(typeof(SpraySafetySystem))]
public sealed partial class SpraySafetyComponent : Component
{
/// <summary>
/// Popup shown when trying to spray or refill with safety on.
/// </summary>
[DataField]
public LocId Popup = "fire-extinguisher-component-safety-on-message";
/// <summary>
/// Sound to play after refilling.
/// </summary>
[DataField]
public SoundSpecifier RefillSound = new SoundPathSpecifier("/Audio/Effects/refill.ogg");
}