From 943c1dd85357009220b0ac27203c5ef6878a3536 Mon Sep 17 00:00:00 2001 From: MSWS Date: Sat, 31 Aug 2024 03:05:37 -0700 Subject: [PATCH 1/4] Unmute everyone on round start regardless of peace status --- mod/Jailbreak.Mute/MuteSystem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/Jailbreak.Mute/MuteSystem.cs b/mod/Jailbreak.Mute/MuteSystem.cs index 89eb9de3..9775d933 100644 --- a/mod/Jailbreak.Mute/MuteSystem.cs +++ b/mod/Jailbreak.Mute/MuteSystem.cs @@ -61,7 +61,6 @@ public void PeaceMute(MuteReason reason) { public void UnPeaceMute() { if (guardTimer != null) unmuteGuards(); - if (prisonerTimer != null) unmutePrisoners(); } @@ -85,6 +84,7 @@ public void Dispose() { [GameEventHandler] public HookResult OnRoundStart(EventRoundStart @event, GameEventInfo info) { UnPeaceMute(); + foreach (var player in Utilities.GetPlayers()) unmute(player); return HookResult.Continue; } From f0e5824a6c4e7e67b4b4be6e7db424cb79a9b6a0 Mon Sep 17 00:00:00 2001 From: MSWS Date: Wed, 18 Sep 2024 20:24:01 -0700 Subject: [PATCH 2/4] Dont enable LR if already enabled --- mod/Jailbreak.LastRequest/LastRequestManager.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/mod/Jailbreak.LastRequest/LastRequestManager.cs b/mod/Jailbreak.LastRequest/LastRequestManager.cs index 29971e58..e30e0eec 100644 --- a/mod/Jailbreak.LastRequest/LastRequestManager.cs +++ b/mod/Jailbreak.LastRequest/LastRequestManager.cs @@ -253,6 +253,7 @@ public HookResult OnPlayerDisconnect(EventPlayerDisconnect @event, private void checkLR() { Server.RunOnTick(Server.TickCount + 32, () => { + if (IsLREnabled) return; if (Utilities.GetPlayers().All(p => p.Team != CsTeam.CounterTerrorist)) return; if (countAlivePrisoners() > CV_PRISONER_TO_LR.Value) return; From 889868f70e373896ce04da78cfe97f596bac973a Mon Sep 17 00:00:00 2001 From: MSWS Date: Thu, 19 Sep 2024 20:29:23 -0700 Subject: [PATCH 3/4] 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) { From 7f384d0ccff133cfb80032534fb9ca5d1ec0e357 Mon Sep 17 00:00:00 2001 From: x3rt Date: Fri, 13 Dec 2024 23:44:25 -0700 Subject: [PATCH 4/4] Stop indefinitely granting the reward --- mod/Jailbreak.RTD/Rewards/ColorReward.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/mod/Jailbreak.RTD/Rewards/ColorReward.cs b/mod/Jailbreak.RTD/Rewards/ColorReward.cs index 14efbc5c..b725c387 100644 --- a/mod/Jailbreak.RTD/Rewards/ColorReward.cs +++ b/mod/Jailbreak.RTD/Rewards/ColorReward.cs @@ -45,7 +45,6 @@ public bool CanGrantReward(CCSPlayerController player) { public bool GrantReward(CCSPlayerController player) { player.SetColor(color); - Server.RunOnTick(Server.TickCount + 2, () => GrantReward(player)); return true; } } \ No newline at end of file