diff --git a/Content.Client/Administration/UI/Tabs/BabyJailTab/BabyJailStatusWindow.xaml b/Content.Client/Administration/UI/Tabs/BabyJailTab/BabyJailStatusWindow.xaml
index 3432f11669..b8034faf52 100644
--- a/Content.Client/Administration/UI/Tabs/BabyJailTab/BabyJailStatusWindow.xaml
+++ b/Content.Client/Administration/UI/Tabs/BabyJailTab/BabyJailStatusWindow.xaml
@@ -2,5 +2,5 @@
xmlns="https://spacestation14.io"
xmlns:controls="clr-namespace:Content.Client.Administration.UI.Tabs.BabyJailTab"
Title="{Loc admin-ui-baby-jail-window-title}">
-
+
diff --git a/Content.Client/Administration/UI/Tabs/BabyJailTab/BabyJailStatusWindow.xaml.cs b/Content.Client/Administration/UI/Tabs/BabyJailTab/BabyJailStatusWindow.xaml.cs
index 4e5f679b45..9e1d53818f 100644
--- a/Content.Client/Administration/UI/Tabs/BabyJailTab/BabyJailStatusWindow.xaml.cs
+++ b/Content.Client/Administration/UI/Tabs/BabyJailTab/BabyJailStatusWindow.xaml.cs
@@ -1,4 +1,6 @@
-using Robust.Client.AutoGenerated;
+using Content.Client.Message;
+using Content.Client.UserInterface.Controls;
+using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.CustomControls;
using Robust.Client.UserInterface.XAML;
@@ -9,10 +11,11 @@ namespace Content.Client.Administration.UI.Tabs.BabyJailTab;
*/
[GenerateTypedNameReferences]
-public sealed partial class BabyJailStatusWindow : DefaultWindow
+public sealed partial class BabyJailStatusWindow : FancyWindow
{
public BabyJailStatusWindow()
{
RobustXamlLoader.Load(this);
+ MessageLabel.SetMarkup(Loc.GetString("admin-ui-baby-jail-is-enabled"));
}
}
diff --git a/Content.Client/Administration/UI/Tabs/PanicBunkerTab/PanicBunkerTab.xaml b/Content.Client/Administration/UI/Tabs/PanicBunkerTab/PanicBunkerTab.xaml
index 89827d0642..ee7ba4d34f 100644
--- a/Content.Client/Administration/UI/Tabs/PanicBunkerTab/PanicBunkerTab.xaml
+++ b/Content.Client/Administration/UI/Tabs/PanicBunkerTab/PanicBunkerTab.xaml
@@ -31,12 +31,12 @@
-
+
-
-
-
+
+
+
diff --git a/Content.Client/Administration/UI/Tabs/PanicBunkerTab/PanicBunkerTab.xaml.cs b/Content.Client/Administration/UI/Tabs/PanicBunkerTab/PanicBunkerTab.xaml.cs
index f6212cd5ee..c3bcf3ffa0 100644
--- a/Content.Client/Administration/UI/Tabs/PanicBunkerTab/PanicBunkerTab.xaml.cs
+++ b/Content.Client/Administration/UI/Tabs/PanicBunkerTab/PanicBunkerTab.xaml.cs
@@ -12,7 +12,7 @@ public sealed partial class PanicBunkerTab : Control
[Dependency] private readonly IConsoleHost _console = default!;
private string _minAccountAge;
- private string _minOverallHours;
+ private string _minOverallMinutes;
public PanicBunkerTab()
{
@@ -25,9 +25,9 @@ public sealed partial class PanicBunkerTab : Control
MinAccountAge.OnFocusExit += args => SendMinAccountAge(args.Text);
_minAccountAge = MinAccountAge.Text;
- MinOverallHours.OnTextEntered += args => SendMinOverallHours(args.Text);
- MinOverallHours.OnFocusExit += args => SendMinOverallHours(args.Text);
- _minOverallHours = MinOverallHours.Text;
+ MinOverallMinutes.OnTextEntered += args => SendMinOverallMinutes(args.Text);
+ MinOverallMinutes.OnFocusExit += args => SendMinOverallMinutes(args.Text);
+ _minOverallMinutes = MinOverallMinutes.Text;
}
private void SendMinAccountAge(string text)
@@ -42,16 +42,16 @@ public sealed partial class PanicBunkerTab : Control
_console.ExecuteCommand($"panicbunker_min_account_age {minutes}");
}
- private void SendMinOverallHours(string text)
+ private void SendMinOverallMinutes(string text)
{
if (string.IsNullOrWhiteSpace(text) ||
- text == _minOverallHours ||
- !int.TryParse(text, out var hours))
+ text == _minOverallMinutes ||
+ !int.TryParse(text, out var minutes))
{
return;
}
- _console.ExecuteCommand($"panicbunker_min_overall_hours {hours}");
+ _console.ExecuteCommand($"panicbunker_min_overall_minutes {minutes}");
}
public void UpdateStatus(PanicBunkerStatus status)
@@ -68,10 +68,10 @@ public sealed partial class PanicBunkerTab : Control
CountDeadminnedButton.Pressed = status.CountDeadminnedAdmins;
ShowReasonButton.Pressed = status.ShowReason;
- MinAccountAge.Text = status.MinAccountAgeHours.ToString();
+ MinAccountAge.Text = status.MinAccountAgeMinutes.ToString();
_minAccountAge = MinAccountAge.Text;
- MinOverallHours.Text = status.MinOverallHours.ToString();
- _minOverallHours = MinOverallHours.Text;
+ MinOverallMinutes.Text = status.MinOverallMinutes.ToString();
+ _minOverallMinutes = MinOverallMinutes.Text;
}
}
diff --git a/Content.Server/Administration/Commands/PanicBunkerCommand.cs b/Content.Server/Administration/Commands/PanicBunkerCommand.cs
index de3f3cbaea..18aed7e3f0 100644
--- a/Content.Server/Administration/Commands/PanicBunkerCommand.cs
+++ b/Content.Server/Administration/Commands/PanicBunkerCommand.cs
@@ -139,7 +139,7 @@ public sealed class PanicBunkerMinAccountAgeCommand : LocalizedCommands
if (args.Length == 0)
{
var current = _cfg.GetCVar(CCVars.PanicBunkerMinAccountAge);
- shell.WriteLine(Loc.GetString("panicbunker-command-min-account-age-is", ("hours", current / 60)));
+ shell.WriteLine(Loc.GetString("panicbunker-command-min-account-age-is", ("minutes", current)));
}
if (args.Length > 1)
@@ -148,30 +148,30 @@ public sealed class PanicBunkerMinAccountAgeCommand : LocalizedCommands
return;
}
- if (!int.TryParse(args[0], out var hours))
+ if (!int.TryParse(args[0], out var minutes))
{
shell.WriteError(Loc.GetString("shell-argument-must-be-number"));
return;
}
- _cfg.SetCVar(CCVars.PanicBunkerMinAccountAge, hours * 60);
- shell.WriteLine(Loc.GetString("panicbunker-command-min-account-age-set", ("hours", hours)));
+ _cfg.SetCVar(CCVars.PanicBunkerMinAccountAge, minutes);
+ shell.WriteLine(Loc.GetString("panicbunker-command-min-account-age-set", ("minutes", minutes)));
}
}
[AdminCommand(AdminFlags.Server)]
-public sealed class PanicBunkerMinOverallHoursCommand : LocalizedCommands
+public sealed class PanicBunkerMinOverallMinutesCommand : LocalizedCommands
{
[Dependency] private readonly IConfigurationManager _cfg = default!;
- public override string Command => "panicbunker_min_overall_hours";
+ public override string Command => "panicbunker_min_overall_minutes";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
if (args.Length == 0)
{
- var current = _cfg.GetCVar(CCVars.PanicBunkerMinOverallHours);
- shell.WriteLine(Loc.GetString("panicbunker-command-min-overall-hours-is", ("minutes", current)));
+ var current = _cfg.GetCVar(CCVars.PanicBunkerMinOverallMinutes);
+ shell.WriteLine(Loc.GetString("panicbunker-command-min-overall-minutes-is", ("minutes", current)));
}
if (args.Length > 1)
@@ -180,13 +180,13 @@ public sealed class PanicBunkerMinOverallHoursCommand : LocalizedCommands
return;
}
- if (!int.TryParse(args[0], out var hours))
+ if (!int.TryParse(args[0], out var minutes))
{
shell.WriteError(Loc.GetString("shell-argument-must-be-number"));
return;
}
- _cfg.SetCVar(CCVars.PanicBunkerMinOverallHours, hours);
- shell.WriteLine(Loc.GetString("panicbunker-command-overall-hours-age-set", ("hours", hours)));
+ _cfg.SetCVar(CCVars.PanicBunkerMinOverallMinutes, minutes);
+ shell.WriteLine(Loc.GetString("panicbunker-command-overall-minutes-age-set", ("minutes", minutes)));
}
}
diff --git a/Content.Server/Administration/ServerApi.cs b/Content.Server/Administration/ServerApi.cs
index d0f23db637..f1f09d4b50 100644
--- a/Content.Server/Administration/ServerApi.cs
+++ b/Content.Server/Administration/ServerApi.cs
@@ -41,7 +41,7 @@ public sealed partial class ServerApi : IPostInjectInit
CCVars.PanicBunkerCountDeadminnedAdmins.Name,
CCVars.PanicBunkerShowReason.Name,
CCVars.PanicBunkerMinAccountAge.Name,
- CCVars.PanicBunkerMinOverallHours.Name,
+ CCVars.PanicBunkerMinOverallMinutes.Name,
CCVars.PanicBunkerCustomReason.Name,
];
diff --git a/Content.Server/Administration/Systems/AdminSystem.cs b/Content.Server/Administration/Systems/AdminSystem.cs
index a12d106880..e5b6e9c3ea 100644
--- a/Content.Server/Administration/Systems/AdminSystem.cs
+++ b/Content.Server/Administration/Systems/AdminSystem.cs
@@ -78,7 +78,7 @@ namespace Content.Server.Administration.Systems
Subs.CVar(_config, CCVars.PanicBunkerCountDeadminnedAdmins, OnPanicBunkerCountDeadminnedAdminsChanged, true);
Subs.CVar(_config, CCVars.PanicBunkerShowReason, OnPanicBunkerShowReasonChanged, true);
Subs.CVar(_config, CCVars.PanicBunkerMinAccountAge, OnPanicBunkerMinAccountAgeChanged, true);
- Subs.CVar(_config, CCVars.PanicBunkerMinOverallHours, OnPanicBunkerMinOverallHoursChanged, true);
+ Subs.CVar(_config, CCVars.PanicBunkerMinOverallMinutes, OnPanicBunkerMinOverallMinutesChanged, true);
/*
* TODO: Remove baby jail code once a more mature gateway process is established. This code is only being issued as a stopgap to help with potential tiding in the immediate future.
@@ -304,7 +304,7 @@ namespace Content.Server.Administration.Systems
private void OnPanicBunkerMinAccountAgeChanged(int minutes)
{
- PanicBunker.MinAccountAgeHours = minutes / 60;
+ PanicBunker.MinAccountAgeMinutes = minutes;
SendPanicBunkerStatusAll();
}
@@ -314,9 +314,9 @@ namespace Content.Server.Administration.Systems
SendBabyJailStatusAll();
}
- private void OnPanicBunkerMinOverallHoursChanged(int hours)
+ private void OnPanicBunkerMinOverallMinutesChanged(int minutes)
{
- PanicBunker.MinOverallHours = hours;
+ PanicBunker.MinOverallMinutes = minutes;
SendPanicBunkerStatusAll();
}
diff --git a/Content.Server/Connection/ConnectionManager.cs b/Content.Server/Connection/ConnectionManager.cs
index 2211a24532..f22ff9b7d5 100644
--- a/Content.Server/Connection/ConnectionManager.cs
+++ b/Content.Server/Connection/ConnectionManager.cs
@@ -186,9 +186,9 @@ namespace Content.Server.Connection
("reason", Loc.GetString("panic-bunker-account-reason-account", ("minutes", minMinutesAge)))), null);
}
- var minOverallHours = _cfg.GetCVar(CCVars.PanicBunkerMinOverallHours);
+ var minOverallMinutes = _cfg.GetCVar(CCVars.PanicBunkerMinOverallMinutes);
var overallTime = ( await _db.GetPlayTimes(e.UserId)).Find(p => p.Tracker == PlayTimeTrackingShared.TrackerOverall);
- var haveMinOverallTime = overallTime != null && overallTime.TimeSpent.TotalHours > minOverallHours;
+ var haveMinOverallTime = overallTime != null && overallTime.TimeSpent.TotalMinutes > minOverallMinutes;
// Use the custom reason if it exists & they don't have the minimum time
if (customReason != string.Empty && !haveMinOverallTime && !bypassAllowed)
@@ -200,7 +200,7 @@ namespace Content.Server.Connection
{
return (ConnectionDenyReason.Panic,
Loc.GetString("panic-bunker-account-denied-reason",
- ("reason", Loc.GetString("panic-bunker-account-reason-overall", ("hours", minOverallHours)))), null);
+ ("reason", Loc.GetString("panic-bunker-account-reason-overall", ("minutes", minOverallMinutes)))), null);
}
if (!validAccountAge || !haveMinOverallTime && !bypassAllowed)
diff --git a/Content.Shared/Administration/Events/PanicBunkerChangedEvent.cs b/Content.Shared/Administration/Events/PanicBunkerChangedEvent.cs
index f809b67bc8..786f645a7f 100644
--- a/Content.Shared/Administration/Events/PanicBunkerChangedEvent.cs
+++ b/Content.Shared/Administration/Events/PanicBunkerChangedEvent.cs
@@ -10,8 +10,8 @@ public sealed class PanicBunkerStatus
public bool EnableWithoutAdmins;
public bool CountDeadminnedAdmins;
public bool ShowReason;
- public int MinAccountAgeHours;
- public int MinOverallHours;
+ public int MinAccountAgeMinutes;
+ public int MinOverallMinutes;
}
[Serializable, NetSerializable]
diff --git a/Content.Shared/CCVar/CCVars.cs b/Content.Shared/CCVar/CCVars.cs
index 491e534395..2ae5c6bd5b 100644
--- a/Content.Shared/CCVar/CCVars.cs
+++ b/Content.Shared/CCVar/CCVars.cs
@@ -304,8 +304,8 @@ namespace Content.Shared.CCVar
///
/// Minimal overall played time.
///
- public static readonly CVarDef PanicBunkerMinOverallHours =
- CVarDef.Create("game.panic_bunker.min_overall_hours", 10, CVar.SERVERONLY);
+ public static readonly CVarDef PanicBunkerMinOverallMinutes =
+ CVarDef.Create("game.panic_bunker.min_overall_minutes", 600, CVar.SERVERONLY);
///
/// A custom message that will be used for connections denied to the panic bunker
diff --git a/Resources/Locale/en-US/administration/commands/panicbunker.ftl b/Resources/Locale/en-US/administration/commands/panicbunker.ftl
index c16748c992..2ea07370ee 100644
--- a/Resources/Locale/en-US/administration/commands/panicbunker.ftl
+++ b/Resources/Locale/en-US/administration/commands/panicbunker.ftl
@@ -23,12 +23,12 @@ cmd-panicbunker_show_reason-help = Usage: panicbunker_show_reason
panicbunker-command-show-reason-enabled = The panic bunker will now show a reason to users it blocks from connecting.
panicbunker-command-show-reason-disabled = The panic bunker will no longer show a reason to users it blocks from connecting.
-cmd-panicbunker_min_account_age-desc = Gets or sets the minimum account age in hours that an account must have to be allowed to connect with the panic bunker enabled.
-cmd-panicbunker_min_account_age-help = Usage: panicbunker_min_account_age
-panicbunker-command-min-account-age-is = The minimum account age for the panic bunker is {$hours} hours.
-panicbunker-command-min-account-age-set = Set the minimum account age for the panic bunker to {$hours} hours.
+cmd-panicbunker_min_account_age-desc = Gets or sets the minimum account age in minutes that an account must have to be allowed to connect with the panic bunker enabled.
+cmd-panicbunker_min_account_age-help = Usage: panicbunker_min_account_age
+panicbunker-command-min-account-age-is = The minimum account age for the panic bunker is {$minutes} minutes.
+panicbunker-command-min-account-age-set = Set the minimum account age for the panic bunker to {$minutes} minutes.
-cmd-panicbunker_min_overall_hours-desc = Gets or sets the minimum overall playtime in hours that an account must have to be allowed to connect with the panic bunker enabled.
-cmd-panicbunker_min_overall_hours-help = Usage: panicbunker_min_overall_hours
-panicbunker-command-min-overall-hours-is = The minimum overall playtime for the panic bunker is {$hours} hours.
-panicbunker-command-min-overall-hours-set = Set the minimum overall playtime for the panic bunker to {$hours} hours.
+cmd-panicbunker_min_overall_minutes-desc = Gets or sets the minimum overall playtime in minutes that an account must have to be allowed to connect with the panic bunker enabled.
+cmd-panicbunker_min_overall_minutes-help = Usage: panicbunker_min_overall_minutes
+panicbunker-command-min-overall-minutes-is = The minimum overall playtime for the panic bunker is {$minutes} minutes.
+panicbunker-command-min-overall-minutes-set = Set the minimum overall playtime for the panic bunker to {$minutes} minutes.
diff --git a/Resources/Locale/en-US/administration/ui/tabs/babyjail-tab.ftl b/Resources/Locale/en-US/administration/ui/tabs/babyjail-tab.ftl
index ad58e436b3..46dce54c1f 100644
--- a/Resources/Locale/en-US/administration/ui/tabs/babyjail-tab.ftl
+++ b/Resources/Locale/en-US/administration/ui/tabs/babyjail-tab.ftl
@@ -10,7 +10,7 @@ admin-ui-baby-jail-show-reason-tooltip = Show the user why they were blocked fro
admin-ui-baby-jail-max-account-age = Max. Account Age
admin-ui-baby-jail-max-overall-minutes = Max. Overall Playtime
-admin-ui-baby-jail-is-enabled = The baby jail is currently enabled.
+admin-ui-baby-jail-is-enabled = [font size=20][bold]The baby jail is currently enabled.[/bold][/font]
admin-ui-baby-jail-enabled-admin-alert = The baby jail has been enabled.
admin-ui-baby-jail-disabled-admin-alert = The baby jail has been disabled.
diff --git a/Resources/Locale/en-US/administration/ui/tabs/panicbunker-tab.ftl b/Resources/Locale/en-US/administration/ui/tabs/panicbunker-tab.ftl
index 730d0c2e3b..26349263ac 100644
--- a/Resources/Locale/en-US/administration/ui/tabs/panicbunker-tab.ftl
+++ b/Resources/Locale/en-US/administration/ui/tabs/panicbunker-tab.ftl
@@ -16,7 +16,7 @@ admin-ui-panic-bunker-show-reason = Show Reason
admin-ui-panic-bunker-show-reason-tooltip = Show the user why they were blocked from connecting by the panic bunker.
admin-ui-panic-bunker-min-account-age = Min. Account Age
-admin-ui-panic-bunker-min-overall-hours = Min. Overall Playtime
+admin-ui-panic-bunker-min-overall-minutes = Min. Overall Playtime
admin-ui-panic-bunker-is-enabled = The panic bunker is currently enabled.
diff --git a/Resources/Locale/en-US/connection-messages.ftl b/Resources/Locale/en-US/connection-messages.ftl
index 88b6442e39..f1596d9015 100644
--- a/Resources/Locale/en-US/connection-messages.ftl
+++ b/Resources/Locale/en-US/connection-messages.ftl
@@ -38,10 +38,10 @@ soft-player-cap-full = The server is full!
panic-bunker-account-denied = This server is in panic bunker mode, often enabled as a precaution against raids. New connections by accounts not meeting certain requirements are temporarily not accepted. Try again later
panic-bunker-account-denied-reason = This server is in panic bunker mode, often enabled as a precaution against raids. New connections by accounts not meeting certain requirements are temporarily not accepted. Try again later. Reason: "{$reason}"
panic-bunker-account-reason-account = Your Space Station 14 account is too new. It must be older than {$minutes} minutes
-panic-bunker-account-reason-overall = Your overall playtime on the server must be greater than {$hours} hours
+panic-bunker-account-reason-overall = Your overall playtime on the server must be greater than {$minutes} $minutes
baby-jail-account-denied = This server is a newbie server, intended for new players and those who want to help them. New connections by accounts that are too old or are not on a whitelist are not accepted. Check out some other servers and see everything Space Station 14 has to offer. Have fun!
baby-jail-account-denied-reason = This server is a newbie server, intended for new players and those who want to help them. New connections by accounts that are too old or are not on a whitelist are not accepted. Check out some other servers and see everything Space Station 14 has to offer. Have fun! Reason: "{$reason}"
baby-jail-account-reason-account = Your Space Station 14 account is too old. It must be younger than {$minutes} minutes
-baby-jail-account-reason-overall = Your overall playtime on the server must be younger than {$hours} hours
+baby-jail-account-reason-overall = Your overall playtime on the server must be younger than {$minutes} $minutes