AME and PA make a warning sound to admins when overloaded along with the warning text (#21267)

* WOOP WOOP

* i forgor to add this

* I totally did not steal code

* OH FUCK

* Ok i'm done using webedit.

* Reviews and AME anti spam

* make sound shorter
This commit is contained in:
Vasilis
2023-11-18 04:18:37 +01:00
committed by GitHub
parent b690f10cdd
commit f7f80b6c28
6 changed files with 60 additions and 5 deletions

View File

@@ -1,5 +1,6 @@
using Content.Server.ParticleAccelerator.Wires;
using Content.Shared.Singularity.Components;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Server.ParticleAccelerator.Components;
@@ -167,6 +168,18 @@ public sealed partial class ParticleAcceleratorControlBoxComponent : Component
[ViewVariables]
public bool StrengthLocked = false;
/// <summary>
/// Time at which the admin alarm sound effect can next be played.
/// </summary>
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
public TimeSpan EffectCooldown;
/// <summary>
/// Time between admin alarm sound effects. Prevents spam
/// </summary>
[DataField]
public TimeSpan CooldownDuration = TimeSpan.FromSeconds(10f);
/// <summary>
/// Whether the PA can be turned on.
/// Modified by <see cref="ParticleAcceleratorPowerWireAction"/>.