From 86ff27920c23c10b9f514b25ae427edb6be7cd99 Mon Sep 17 00:00:00 2001 From: Kubisopplay <38842052+Kubisopplay@users.noreply.github.com> Date: Mon, 24 Jan 2022 17:04:48 +0100 Subject: [PATCH] Fixing malf AI: episode 3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Malf ai is the only antag who uses exclusive roles at roundstart. It means that when someone used a function that sounded just right, but assumed it returns 1 when true, the entire roundstart ruleset couldn't ever find candidates. About The Pull Request Literally checks if the value returned means that player is eligible for the job. Why It's Good For The Game Makes antag happen again Changelog 🆑 fix: Malfunction in malfunctioning ai protocols should be fixed, AIs should break regularly again. /🆑 --- code/game/gamemodes/dynamic/dynamic_rulesets.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets.dm b/code/game/gamemodes/dynamic/dynamic_rulesets.dm index ccc4be3560c..51fc5346657 100644 --- a/code/game/gamemodes/dynamic/dynamic_rulesets.dm +++ b/code/game/gamemodes/dynamic/dynamic_rulesets.dm @@ -225,7 +225,7 @@ for(var/role in exclusive_roles) var/datum/job/job = SSjob.GetJob(role) - if((role in candidate_client.prefs.job_preferences) && SSjob.check_job_eligibility(candidate_player, job, "Dynamic Roundstart TC", add_job_to_log = TRUE)) + if((role in candidate_client.prefs.job_preferences) && SSjob.check_job_eligibility(candidate_player, job, "Dynamic Roundstart TC", add_job_to_log = TRUE)==JOB_AVAILABLE) exclusive_candidate = TRUE break