From 889868f70e373896ce04da78cfe97f596bac973a Mon Sep 17 00:00:00 2001 From: MSWS Date: Thu, 19 Sep 2024 20:29:23 -0700 Subject: [PATCH] Fix warden breaking after guaranteed warden rtd --- mod/Jailbreak.LastRequest/LastRequestFactory.cs | 1 + mod/Jailbreak.LastRequest/LastRequestManager.cs | 6 +++++- mod/Jailbreak.LastRequest/LastRequests/BulletForBullet.cs | 1 + mod/Jailbreak.LastRequest/LastRequests/Coinflip.cs | 1 + mod/Jailbreak.LastRequest/LastRequests/KnifeFight.cs | 1 + mod/Jailbreak.LastRequest/LastRequests/NoScope.cs | 1 + mod/Jailbreak.LastRequest/LastRequests/RockPaperScissors.cs | 1 + mod/Jailbreak.LastRequest/LastRequests/WeaponizedRequest.cs | 1 + mod/Jailbreak.Warden/Selection/WardenSelectionBehavior.cs | 3 +-- 9 files changed, 13 insertions(+), 3 deletions(-) diff --git a/mod/Jailbreak.LastRequest/LastRequestFactory.cs b/mod/Jailbreak.LastRequest/LastRequestFactory.cs index af23fead..7135b305 100644 --- a/mod/Jailbreak.LastRequest/LastRequestFactory.cs +++ b/mod/Jailbreak.LastRequest/LastRequestFactory.cs @@ -1,3 +1,4 @@ +using System; using CounterStrikeSharp.API.Core; using Jailbreak.Formatting.Views.LastRequest; using Jailbreak.LastRequest.LastRequests; diff --git a/mod/Jailbreak.LastRequest/LastRequestManager.cs b/mod/Jailbreak.LastRequest/LastRequestManager.cs index e30e0eec..ee87d645 100644 --- a/mod/Jailbreak.LastRequest/LastRequestManager.cs +++ b/mod/Jailbreak.LastRequest/LastRequestManager.cs @@ -1,4 +1,8 @@ -using CounterStrikeSharp.API; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using CounterStrikeSharp.API; using CounterStrikeSharp.API.Core; using CounterStrikeSharp.API.Core.Attributes.Registration; using CounterStrikeSharp.API.Modules.Cvars; diff --git a/mod/Jailbreak.LastRequest/LastRequests/BulletForBullet.cs b/mod/Jailbreak.LastRequest/LastRequests/BulletForBullet.cs index 06e9b3a7..5f627ed6 100644 --- a/mod/Jailbreak.LastRequest/LastRequests/BulletForBullet.cs +++ b/mod/Jailbreak.LastRequest/LastRequests/BulletForBullet.cs @@ -1,3 +1,4 @@ +using System; using CounterStrikeSharp.API; using CounterStrikeSharp.API.Core; using CounterStrikeSharp.API.Modules.Menu; diff --git a/mod/Jailbreak.LastRequest/LastRequests/Coinflip.cs b/mod/Jailbreak.LastRequest/LastRequests/Coinflip.cs index fa8bc3a6..aff1eef2 100644 --- a/mod/Jailbreak.LastRequest/LastRequests/Coinflip.cs +++ b/mod/Jailbreak.LastRequest/LastRequests/Coinflip.cs @@ -1,3 +1,4 @@ +using System; using CounterStrikeSharp.API.Core; using CounterStrikeSharp.API.Modules.Menu; using Jailbreak.Formatting.Extensions; diff --git a/mod/Jailbreak.LastRequest/LastRequests/KnifeFight.cs b/mod/Jailbreak.LastRequest/LastRequests/KnifeFight.cs index 4b1e38a2..5b025256 100644 --- a/mod/Jailbreak.LastRequest/LastRequests/KnifeFight.cs +++ b/mod/Jailbreak.LastRequest/LastRequests/KnifeFight.cs @@ -1,3 +1,4 @@ +using System; using CounterStrikeSharp.API.Core; using Jailbreak.Public.Mod.LastRequest.Enums; diff --git a/mod/Jailbreak.LastRequest/LastRequests/NoScope.cs b/mod/Jailbreak.LastRequest/LastRequests/NoScope.cs index 1d3a4654..bd498a39 100644 --- a/mod/Jailbreak.LastRequest/LastRequests/NoScope.cs +++ b/mod/Jailbreak.LastRequest/LastRequests/NoScope.cs @@ -1,3 +1,4 @@ +using System; using CounterStrikeSharp.API; using CounterStrikeSharp.API.Core; using CounterStrikeSharp.API.Modules.Timers; diff --git a/mod/Jailbreak.LastRequest/LastRequests/RockPaperScissors.cs b/mod/Jailbreak.LastRequest/LastRequests/RockPaperScissors.cs index a6759bec..dee5a6a4 100644 --- a/mod/Jailbreak.LastRequest/LastRequests/RockPaperScissors.cs +++ b/mod/Jailbreak.LastRequest/LastRequests/RockPaperScissors.cs @@ -1,3 +1,4 @@ +using System; using CounterStrikeSharp.API.Core; using CounterStrikeSharp.API.Modules.Menu; using CounterStrikeSharp.API.Modules.Timers; diff --git a/mod/Jailbreak.LastRequest/LastRequests/WeaponizedRequest.cs b/mod/Jailbreak.LastRequest/LastRequests/WeaponizedRequest.cs index b0d13682..fb228a23 100644 --- a/mod/Jailbreak.LastRequest/LastRequests/WeaponizedRequest.cs +++ b/mod/Jailbreak.LastRequest/LastRequests/WeaponizedRequest.cs @@ -1,3 +1,4 @@ +using System; using CounterStrikeSharp.API.Core; using Jailbreak.Formatting.Extensions; using Jailbreak.Formatting.Views.LastRequest; diff --git a/mod/Jailbreak.Warden/Selection/WardenSelectionBehavior.cs b/mod/Jailbreak.Warden/Selection/WardenSelectionBehavior.cs index a2a70ce2..dbbe15ff 100644 --- a/mod/Jailbreak.Warden/Selection/WardenSelectionBehavior.cs +++ b/mod/Jailbreak.Warden/Selection/WardenSelectionBehavior.cs @@ -112,6 +112,7 @@ public void ScheduleChooseWarden(float time = 7.0f) { /// protected void OnChooseWarden() { guaranteedWarden.Clear(); + queueInactive = true; if (warden.HasWarden) return; var eligible = Utilities.GetPlayers() .Where(player => player.PawnIsAlive) @@ -124,7 +125,6 @@ protected void OnChooseWarden() { if (eligible.Count == 0) { locale.NoWardens.ToAllChat(); - queueInactive = true; return; } @@ -154,7 +154,6 @@ protected void OnChooseWarden() { // Disable the warden raffle for future wardens // (eg in the event of warden death) - queueInactive = true; } private bool canEnterQueue(CCSPlayerController player) {