Allow changing alert level delay. (#17435)

This commit is contained in:
Pieter-Jan Briers
2023-06-24 14:01:14 +02:00
committed by GitHub
parent 489077868c
commit 3e03418238
3 changed files with 10 additions and 3 deletions

View File

@@ -1,8 +1,10 @@
using System.Linq;
using Content.Server.Chat.Systems;
using Content.Server.Station.Systems;
using Content.Shared.CCVar;
using Content.Shared.PDA;
using Robust.Shared.Audio;
using Robust.Shared.Configuration;
using Robust.Shared.Prototypes;
namespace Content.Server.AlertLevel;
@@ -12,6 +14,7 @@ public sealed class AlertLevelSystem : EntitySystem
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly ChatSystem _chatSystem = default!;
[Dependency] private readonly StationSystem _stationSystem = default!;
[Dependency] private readonly IConfigurationManager _cfg = default!;
// Until stations are a prototype, this is how it's going to have to be.
public const string DefaultAlertLevelSet = "stationAlerts";
@@ -138,7 +141,7 @@ public sealed class AlertLevelSystem : EntitySystem
return;
}
component.CurrentDelay = AlertLevelComponent.Delay;
component.CurrentDelay = _cfg.GetCVar(CCVars.GameAlertLevelChangeDelay);
component.ActiveDelay = true;
}