From ba4829fecb5e5dc504189706c25b7742f2124d76 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sun, 21 Feb 2021 15:16:39 +0100 Subject: [PATCH] [MIRROR] Fix multiple high impact rulesets being chosen on Dynamic (#3561) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix multiple high impact rulesets being chosen (#57036) About The Pull Request This was code I didn't touch but just never worked. I'm pretty sure this is the fix. Changelog 🆑 fix: Fixed multiple high impact rulesets being chosen on Dynamic. /🆑 * Fix multiple high impact rulesets being chosen on Dynamic Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com> --- code/game/gamemodes/dynamic/dynamic.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/game/gamemodes/dynamic/dynamic.dm b/code/game/gamemodes/dynamic/dynamic.dm index 0a776922deb..67f1bafec98 100644 --- a/code/game/gamemodes/dynamic/dynamic.dm +++ b/code/game/gamemodes/dynamic/dynamic.dm @@ -537,7 +537,7 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1) rule = pickweight(drafted_rules) // Check if the ruleset is high impact and if a high impact ruleset has been executed else if(rule.flags & HIGH_IMPACT_RULESET) - if(threat_level > GLOB.dynamic_stacking_limit && GLOB.dynamic_no_stacking) + if(threat_level < GLOB.dynamic_stacking_limit && GLOB.dynamic_no_stacking) if(high_impact_ruleset_executed) drafted_rules -= rule if(drafted_rules.len <= 0) @@ -575,7 +575,7 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1) return FALSE // Check if the ruleset is high impact and if a high impact ruleset has been executed else if(new_rule.flags & HIGH_IMPACT_RULESET) - if(threat_level > GLOB.dynamic_stacking_limit && GLOB.dynamic_no_stacking) + if(threat_level < GLOB.dynamic_stacking_limit && GLOB.dynamic_no_stacking) if(high_impact_ruleset_executed) return FALSE @@ -732,7 +732,7 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1) continue if (rule.acceptable(current_players[CURRENT_LIVING_PLAYERS].len, threat_level) && mid_round_budget >= rule.cost) // No stacking : only one round-ender, unless threat level > stacking_limit. - if (threat_level > GLOB.dynamic_stacking_limit && GLOB.dynamic_no_stacking) + if (threat_level < GLOB.dynamic_stacking_limit && GLOB.dynamic_no_stacking) if(rule.flags & HIGH_IMPACT_RULESET && high_impact_ruleset_executed) continue