Experimental nukie changes (#9428)

This commit is contained in:
Kara
2022-07-04 23:49:19 -07:00
committed by GitHub
parent 398f05657c
commit 69871ef73a
6 changed files with 122 additions and 30 deletions

View File

@@ -1,3 +1,4 @@
using System.Threading;
using Content.Shared.Containers.ItemSlots;
using Content.Shared.Explosion;
using Content.Shared.Nuke;
@@ -18,11 +19,10 @@ namespace Content.Server.Nuke
{
/// <summary>
/// Default bomb timer value in seconds.
/// Must be shorter then the nuke alarm song.
/// </summary>
[DataField("timer")]
[ViewVariables(VVAccess.ReadWrite)]
public int Timer = 120;
public int Timer = 300;
/// <summary>
/// How long until the bomb can arm again after deactivation.
@@ -40,11 +40,17 @@ namespace Content.Server.Nuke
public ItemSlot DiskSlot = new();
/// <summary>
/// After this time nuke will play last alert sound
/// When this time is left, nuke will play last alert sound
/// </summary>
[DataField("alertTime")]
public float AlertSoundTime = 10.0f;
/// <summary>
/// How long a user must wait to disarm the bomb.
/// </summary>
[DataField("disarmDoafterLength")]
public float DisarmDoafterLength = 30.0f;
[DataField("alertLevelOnActivate")] public string AlertLevelOnActivate = default!;
[DataField("alertLevelOnDeactivate")] public string AlertLevelOnDeactivate = default!;
@@ -136,11 +142,18 @@ namespace Content.Server.Nuke
[ViewVariables]
public NukeStatus Status = NukeStatus.AWAIT_DISK;
/// <summary>
/// Check if nuke has already played the nuke song so we don't do it again
/// </summary>
public bool PlayedNukeSong = false;
/// <summary>
/// Check if nuke has already played last alert sound
/// </summary>
public bool PlayedAlertSound = false;
public CancellationToken? DisarmCancelToken = null;
public IPlayingAudioStream? AlertAudioStream = default;
}
}