Make early launches a cvar (#10213)
Apparently our LRP playerbase sucks.
This commit is contained in:
@@ -5,6 +5,7 @@ using Content.Server.RoundEnd;
|
||||
using Content.Server.Shuttles.Components;
|
||||
using Content.Server.Shuttles.Events;
|
||||
using Content.Server.Station.Components;
|
||||
using Content.Server.UserInterface;
|
||||
using Content.Shared.Access.Systems;
|
||||
using Content.Shared.CCVar;
|
||||
using Content.Shared.Database;
|
||||
@@ -82,6 +83,18 @@ public sealed partial class ShuttleSystem
|
||||
SubscribeLocalEvent<EmergencyShuttleConsoleComponent, EmergencyShuttleAuthorizeMessage>(OnEmergencyAuthorize);
|
||||
SubscribeLocalEvent<EmergencyShuttleConsoleComponent, EmergencyShuttleRepealMessage>(OnEmergencyRepeal);
|
||||
SubscribeLocalEvent<EmergencyShuttleConsoleComponent, EmergencyShuttleRepealAllMessage>(OnEmergencyRepealAll);
|
||||
SubscribeLocalEvent<EmergencyShuttleConsoleComponent, ActivatableUIOpenAttemptEvent>(OnEmergencyOpenAttempt);
|
||||
}
|
||||
|
||||
private void OnEmergencyOpenAttempt(EntityUid uid, EmergencyShuttleConsoleComponent component, ActivatableUIOpenAttemptEvent args)
|
||||
{
|
||||
// I'm hoping ActivatableUI checks it's open before allowing these messages.
|
||||
if (!_configManager.GetCVar(CCVars.EmergencyEarlyLaunchAllowed))
|
||||
{
|
||||
args.Cancel();
|
||||
_popup.PopupEntity(Loc.GetString("emergency-shuttle-console-no-early-launches"), uid, Filter.Entities(args.User));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private void SetAuthorizeTime(float obj)
|
||||
|
||||
Reference in New Issue
Block a user