From 417277385ec5ca2fbe7787710134d0604bb904f1 Mon Sep 17 00:00:00 2001
From: SimpleStation14 <130339894+SimpleStation14@users.noreply.github.com>
Date: Sat, 4 May 2024 17:41:05 -0700
Subject: [PATCH] Mirror: Fix game.role_timers not effecting the antag menu
(#135)
## Mirror of PR #25964: [Fix game.role_timers not effecting the antag
menu](https://github.com/space-wizards/space-station-14/pull/25964) from
[space-wizards](https://github.com/space-wizards)/[space-station-14](https://github.com/space-wizards/space-station-14)
###### `1eb2bcf45532c4200c1f2606d1759fe335a636f7`
PR opened by
VasilisThePikachu at 2024-03-10 14:11:20 UTC
PR merged by web-flow at
2024-03-10 16:30:16 UTC
---
PR changed 1 files with 1 additions and 7 deletions.
The PR had the following labels:
---
Original Body
>
>
>
> ## About the PR
>
> Closes #21404
>
> The server checked this fine and would let you join correctly as the
antag. Just the client prevented you.
>
> ## Media
>
>
> - [x] I have added screenshots/videos to this PR showcasing its
changes ingame, **or** this PR does not require an ingame showcase
Co-authored-by: Vasilis
---
.../Players/PlayTimeTracking/JobRequirementsManager.cs | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/Content.Client/Players/PlayTimeTracking/JobRequirementsManager.cs b/Content.Client/Players/PlayTimeTracking/JobRequirementsManager.cs
index 3b1e65c34e1..b8267ea2955 100644
--- a/Content.Client/Players/PlayTimeTracking/JobRequirementsManager.cs
+++ b/Content.Client/Players/PlayTimeTracking/JobRequirementsManager.cs
@@ -89,12 +89,6 @@ public bool IsAllowed(JobPrototype job, [NotNullWhen(false)] out FormattedMessag
return false;
}
- if (job.Requirements == null ||
- !_cfg.GetCVar(CCVars.GameRoleTimers))
- {
- return true;
- }
-
var player = _playerManager.LocalSession;
if (player == null)
return true;
@@ -106,7 +100,7 @@ public bool CheckRoleTime(HashSet? requirements, [NotNullWhen(fa
{
reason = null;
- if (requirements == null)
+ if (requirements == null || !_cfg.GetCVar(CCVars.GameRoleTimers))
return true;
var reasons = new List();