Cargo request and bounty console deny sound cooldown (#37234)

* Cargo bounty console deny sound cooldown

* ordering computer cooldown

* Update Content.Shared/Cargo/Components/CargoBountyConsoleComponent.cs

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* Update Content.Shared/Cargo/Components/CargoBountyConsoleComponent.cs

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* Update Content.Server/Cargo/Systems/CargoSystem.Bounty.cs

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* AutoGenerateComponentPause

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
This commit is contained in:
themias
2025-05-07 20:34:44 -04:00
committed by GitHub
parent b3c4c7c32b
commit 14adb1ff01
4 changed files with 38 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
using Robust.Shared.Audio;
using Robust.Shared.Audio;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
@@ -6,7 +6,7 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy
namespace Content.Shared.Cargo.Components;
[RegisterComponent]
[RegisterComponent, AutoGenerateComponentPause]
public sealed partial class CargoBountyConsoleComponent : Component
{
/// <summary>
@@ -44,6 +44,18 @@ public sealed partial class CargoBountyConsoleComponent : Component
/// </summary>
[DataField("denySound")]
public SoundSpecifier DenySound = new SoundPathSpecifier("/Audio/Effects/Cargo/buzz_two.ogg");
/// <summary>
/// The time at which the console will be able to make the denial sound again.
/// </summary>
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoPausedField]
public TimeSpan NextDenySoundTime = TimeSpan.Zero;
/// <summary>
/// The time between playing a denial sound.
/// </summary>
[DataField]
public TimeSpan DenySoundDelay = TimeSpan.FromSeconds(2);
}
[NetSerializable, Serializable]