From 3547e6d9904391938f9d88a05963d44fc16dfa7c Mon Sep 17 00:00:00 2001 From: Simplehorror <101573582+Simplehorror@users.noreply.github.com> Date: Sat, 23 Apr 2022 21:00:35 +0100 Subject: [PATCH 1/2] Commit 1 --- code/game/gamemodes/objective.dm | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 8f53fee615a2..5ba5ef72cf3c 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -213,7 +213,11 @@ GLOBAL_LIST_EMPTY(objectives) /datum/objective/assassinate/update_explanation_text() ..() if(target && target.current) - explanation_text = "Assassinate [target.name], the [!target_role_type ? target.assigned_role : target.special_role]." + if (ishuman(target.current)) + var/mob/living/carbon/human/H = target.current + explanation_text = "Assassinate [target.name], the [lowertext(H.dna.species.name)] [!target_role_type ? target.assigned_role : target.special_role]." + else + explanation_text = "Assassinate [target.name], the [!target_role_type ? target.assigned_role : target.special_role]." else explanation_text = "Free Objective" @@ -226,7 +230,11 @@ GLOBAL_LIST_EMPTY(objectives) /datum/objective/assassinate/once/update_explanation_text() START_PROCESSING(SSprocessing, src) if(target && target.current) - explanation_text = "Ensure [target.name], the [!target_role_type ? target.assigned_role : target.special_role] has died at least once." + if (ishuman(target.current)) + var/mob/living/carbon/human/H = target.current + explanation_text = "Ensure [target.name], the [lowertext(H.dna.species.name)] [!target_role_type ? target.assigned_role : target.special_role][!target_role_type ? target.assigned_role : target.special_role] has died at least once." + else + explanation_text = "Ensure [target.name], the [!target_role_type ? target.assigned_role : target.special_role][!target_role_type ? target.assigned_role : target.special_role] has died at least once." else explanation_text = "Free Objective" @@ -241,7 +249,11 @@ GLOBAL_LIST_EMPTY(objectives) /datum/objective/assassinate/cloned/update_explanation_text() if(target && target.current) - explanation_text = "Ensure the [!target_role_type ? target.assigned_role : target.special_role] [target.name]'s original body is dead." + if (ishuman(target.current)) + var/mob/living/carbon/human/H = target.current + explanation_text = "Ensure the [lowertext(H.dna.species.name)] [!target_role_type ? target.assigned_role : target.special_role] [target.name]'s original body is dead." + else + explanation_text = "Ensure the [!target_role_type ? target.assigned_role : target.special_role] [target.name]'s original body is dead." original = target.current else explanation_text = "Free Objective" @@ -303,7 +315,11 @@ GLOBAL_LIST_EMPTY(objectives) /datum/objective/maroon/update_explanation_text() if(target && target.current) - explanation_text = "Prevent [target.name], the [!target_role_type ? target.assigned_role : target.special_role], from escaping alive." + if (ishuman(target.current)) + var/mob/living/carbon/human/H = target.current + explanation_text = "Prevent [target.name], the [lowertext(H.dna.species.name)] [!target_role_type ? target.assigned_role : target.special_role], from escaping alive." + else + explanation_text = "Prevent [target.name], the [!target_role_type ? target.assigned_role : target.special_role], from escaping alive." else explanation_text = "Free Objective" From 7128dc1757fd95b1362ba57b874fb7f7529aadec Mon Sep 17 00:00:00 2001 From: Jamie D <993128+JamieD1@users.noreply.github.com> Date: Sun, 24 Apr 2022 13:52:39 +0100 Subject: [PATCH 2/2] Apply suggestions from code review --- code/game/gamemodes/objective.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 5ba5ef72cf3c..34b28c1fdca5 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -213,7 +213,7 @@ GLOBAL_LIST_EMPTY(objectives) /datum/objective/assassinate/update_explanation_text() ..() if(target && target.current) - if (ishuman(target.current)) + if(ishuman(target.current)) var/mob/living/carbon/human/H = target.current explanation_text = "Assassinate [target.name], the [lowertext(H.dna.species.name)] [!target_role_type ? target.assigned_role : target.special_role]." else @@ -230,7 +230,7 @@ GLOBAL_LIST_EMPTY(objectives) /datum/objective/assassinate/once/update_explanation_text() START_PROCESSING(SSprocessing, src) if(target && target.current) - if (ishuman(target.current)) + if(ishuman(target.current)) var/mob/living/carbon/human/H = target.current explanation_text = "Ensure [target.name], the [lowertext(H.dna.species.name)] [!target_role_type ? target.assigned_role : target.special_role][!target_role_type ? target.assigned_role : target.special_role] has died at least once." else @@ -249,7 +249,7 @@ GLOBAL_LIST_EMPTY(objectives) /datum/objective/assassinate/cloned/update_explanation_text() if(target && target.current) - if (ishuman(target.current)) + if(ishuman(target.current)) var/mob/living/carbon/human/H = target.current explanation_text = "Ensure the [lowertext(H.dna.species.name)] [!target_role_type ? target.assigned_role : target.special_role] [target.name]'s original body is dead." else @@ -315,7 +315,7 @@ GLOBAL_LIST_EMPTY(objectives) /datum/objective/maroon/update_explanation_text() if(target && target.current) - if (ishuman(target.current)) + if(ishuman(target.current)) var/mob/living/carbon/human/H = target.current explanation_text = "Prevent [target.name], the [lowertext(H.dna.species.name)] [!target_role_type ? target.assigned_role : target.special_role], from escaping alive." else