Fix airlock lights (#5334)
* Doors no longer permanently glow orange + logic tweak * Fix server-side order of operations for deny animation timer * Delay between deny >= deny length to allow animation to reset * Fix airlock assets to use the correct deny animation name Co-authored-by: T <tomeno@lulzsec.co.uk>
This commit is contained in:
@@ -186,7 +186,7 @@ namespace Content.Server.Doors.Components
|
||||
/// Minimum interval allowed between deny sounds in milliseconds.
|
||||
/// </summary>
|
||||
[DataField("denySoundMinimumInterval")]
|
||||
public float DenySoundMinimumInterval = 250.0f;
|
||||
public float DenySoundMinimumInterval = 450.0f;
|
||||
|
||||
/// <summary>
|
||||
/// Used to stop people from spamming the deny sound.
|
||||
@@ -607,10 +607,6 @@ namespace Content.Server.Doors.Components
|
||||
if (State == DoorState.Open || IsWeldedShut)
|
||||
return;
|
||||
|
||||
_stateChangeCancelTokenSource?.Cancel();
|
||||
_stateChangeCancelTokenSource = new();
|
||||
SetAppearance(DoorVisualState.Deny);
|
||||
|
||||
if (DenySound != null)
|
||||
{
|
||||
if (LastDenySoundTime == TimeSpan.Zero)
|
||||
@@ -629,6 +625,9 @@ namespace Content.Server.Doors.Components
|
||||
AudioParams.Default.WithVolume(-3));
|
||||
}
|
||||
|
||||
_stateChangeCancelTokenSource?.Cancel();
|
||||
_stateChangeCancelTokenSource = new();
|
||||
SetAppearance(DoorVisualState.Deny);
|
||||
Owner.SpawnTimer(DenyTime, () =>
|
||||
{
|
||||
SetAppearance(DoorVisualState.Closed);
|
||||
|
||||
Reference in New Issue
Block a user