From 000dd98573bea249ce01f898d5372737869c4d09 Mon Sep 17 00:00:00 2001 From: Fayrik Date: Sun, 19 Apr 2015 15:22:49 +0100 Subject: [PATCH] Fixes a not-so edge case where ERTs and Deathsquads were reporting failure when they were spawned correctly. --- code/modules/admin/verbs/one_click_antag.dm | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/code/modules/admin/verbs/one_click_antag.dm b/code/modules/admin/verbs/one_click_antag.dm index 8b33acf73b3..c78793ac84a 100644 --- a/code/modules/admin/verbs/one_click_antag.dm +++ b/code/modules/admin/verbs/one_click_antag.dm @@ -314,6 +314,7 @@ client/proc/one_click_antag() /datum/admins/proc/makeDeathsquad() var/mission = input("Assign a mission to the deathsquad", "Assign Mission", "Leave no witnesses.") var/list/mob/dead/observer/candidates = getCandidates("Do you wish to be considered for an elite Nanotrasen Strike Team?", "deathsquad", null) + var/squadSpawned = 0 if(candidates.len >= 2) //Minimum 2 to be considered a squad //Pick the lucky players @@ -366,11 +367,12 @@ client/proc/one_click_antag() message_admins("The deathsquad has spawned with the mission: [mission].") log_game("[key_name(Commando)] has been selected as a Death Commando") numagents-- + squadSpawned++ - if (numagents == candidates.len) - return 0 // No one got spawned! - else + if (squadSpawned) return 1 + else + return 0 return @@ -411,6 +413,7 @@ client/proc/one_click_antag() /datum/admins/proc/makeEmergencyresponseteam() var/mission = input("Assign a mission to the Emergency Response Team", "Assign Mission", "Assist the station.") var/list/mob/dead/observer/candidates = getCandidates("Do you wish to be considered for an elite Nanotrasen Emergency Response Team?", "deathsquad", null) + var/teamSpawned = 0 if(candidates.len >= 4) //Minimum 4 to be considered a squad //Pick the (un)lucky players @@ -480,11 +483,12 @@ client/proc/one_click_antag() message_admins("The emergency response team has spawned with the mission: [mission].") log_game("[key_name(ERTOperative)] has been selected as an Emergency Response Officer") numagents-- + teamSpawned++ - if (numagents == candidates.len) - return 0 // No one got spawned! - else + if (teamSpawned) return 1 + else + return 0 return