From 54138129583868e9a408aa77997dc315d5f35e85 Mon Sep 17 00:00:00 2001 From: ikarrus Date: Sat, 23 Aug 2014 21:41:49 -0600 Subject: [PATCH 1/2] Deathsquad names will pull from the deathsquad name list I didn't know they were a thing. But now they are, once again! --- code/modules/admin/verbs/one_click_antag.dm | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/code/modules/admin/verbs/one_click_antag.dm b/code/modules/admin/verbs/one_click_antag.dm index 7a97af075c1..96b04531db1 100644 --- a/code/modules/admin/verbs/one_click_antag.dm +++ b/code/modules/admin/verbs/one_click_antag.dm @@ -355,17 +355,10 @@ client/proc/one_click_antag() var/mob/living/carbon/human/Commando = new(spawnloc) chosen_candidate.client.prefs.copy_to(Commando) ready_dna(Commando) - switch(numagents) - if(1) - Commando.real_name = "Officer Alpha" - if(2) - Commando.real_name = "Trooper Beta" - if(3) - Commando.real_name = "Trooper Charlie" - if(4) - Commando.real_name = "Trooper Delta" - if(5) - Commando.real_name = "Trooper Echo" + if(numagents == 1) + Commando.real_name = "Officer [pick(commando_names)]" + else + Commando.real_name = "Trooper [pick(commando_names)]" if(numagents == 1) //If Squad Leader equip_deathsquad(Commando, 1) else From cba3fa364fc543b83982a5a1d073087d3f2eb353 Mon Sep 17 00:00:00 2001 From: ikarrus Date: Sat, 23 Aug 2014 21:43:48 -0600 Subject: [PATCH 2/2] Reducing dup code --- code/modules/admin/verbs/one_click_antag.dm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/code/modules/admin/verbs/one_click_antag.dm b/code/modules/admin/verbs/one_click_antag.dm index 96b04531db1..c70fed34e0c 100644 --- a/code/modules/admin/verbs/one_click_antag.dm +++ b/code/modules/admin/verbs/one_click_antag.dm @@ -355,13 +355,11 @@ client/proc/one_click_antag() var/mob/living/carbon/human/Commando = new(spawnloc) chosen_candidate.client.prefs.copy_to(Commando) ready_dna(Commando) - if(numagents == 1) - Commando.real_name = "Officer [pick(commando_names)]" - else - Commando.real_name = "Trooper [pick(commando_names)]" if(numagents == 1) //If Squad Leader + Commando.real_name = "Officer [pick(commando_names)]" equip_deathsquad(Commando, 1) else + Commando.real_name = "Trooper [pick(commando_names)]" equip_deathsquad(Commando) Commando.key = chosen_candidate.key Commando.mind.assigned_role = "Death Commando"