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>
This commit is contained in:
24
Content.Shared/Fluids/Components/SpraySafetyComponent.cs
Normal file
24
Content.Shared/Fluids/Components/SpraySafetyComponent.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
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");
|
||||
}
|
||||
Reference in New Issue
Block a user