Panic Bunker uses minutes not hours (#28805)

* Panic Bunker uses minutes not hours

* Fixing an instance of hours
This commit is contained in:
Hannah Giovanna Dawson
2024-06-09 21:45:47 +01:00
committed by GitHub
parent 50d83b9360
commit 1bb9d9451f
14 changed files with 56 additions and 53 deletions

View File

@@ -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)