* 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>
49 lines
1.2 KiB
C#
49 lines
1.2 KiB
C#
using Content.Shared.DoAfter;
|
|
using Content.Shared.FixedPoint;
|
|
using Robust.Shared.Audio;
|
|
using Robust.Shared.Serialization;
|
|
|
|
namespace Content.Shared.Fluids;
|
|
|
|
[Serializable, NetSerializable]
|
|
public sealed partial class AbsorbantDoAfterEvent : DoAfterEvent
|
|
{
|
|
[DataField("solution", required: true)]
|
|
public string TargetSolution = default!;
|
|
|
|
[DataField("message", required: true)]
|
|
public string Message = default!;
|
|
|
|
[DataField("sound", required: true)]
|
|
public SoundSpecifier Sound = default!;
|
|
|
|
[DataField("transferAmount", required: true)]
|
|
public FixedPoint2 TransferAmount;
|
|
|
|
private AbsorbantDoAfterEvent()
|
|
{
|
|
}
|
|
|
|
public AbsorbantDoAfterEvent(string targetSolution, string message, SoundSpecifier sound, FixedPoint2 transferAmount)
|
|
{
|
|
TargetSolution = targetSolution;
|
|
Message = message;
|
|
Sound = sound;
|
|
TransferAmount = transferAmount;
|
|
}
|
|
|
|
public override DoAfterEvent Clone() => this;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Raised when trying to spray something, for example a fire extinguisher.
|
|
/// </summary>
|
|
[ByRefEvent]
|
|
public record struct SprayAttemptEvent(EntityUid User, bool Cancelled = false)
|
|
{
|
|
public void Cancel()
|
|
{
|
|
Cancelled = true;
|
|
}
|
|
}
|