diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 35733590f64..2cea7838cbf 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -580,10 +580,22 @@ datum/mind new_objective.target_amount = target_number if("identity theft") + var/list/possible_targets = list("Free objective") + for(var/datum/mind/possible_target in ticker.minds) + if ((possible_target != src) && istype(possible_target.current, /mob/living/carbon/human)) + possible_targets += possible_target.current + + var/new_target = input("Select target:", "Objective target") as null|anything in possible_targets + if (!new_target) + return + var/datum/mind/targ = new_target + if(!istype(targ)) + log_debug("Invalid target for identity theft objective, cancelling") + return new_objective = new /datum/objective/escape/escape_with_identity new_objective.owner = src - new_objective.find_target() - + new_objective.target = new_target + new_objective.explanation_text = "Escape on the shuttle or an escape pod with the identity of [targ.current.real_name], the [targ.assigned_role] while wearing their identification card." if ("custom") var/expl = copytext(sanitize(input("Custom objective:", "Objective", objective ? objective.explanation_text : "") as text|null),1,MAX_MESSAGE_LEN) if (!expl) return diff --git a/code/game/gamemodes/changeling/changeling.dm b/code/game/gamemodes/changeling/changeling.dm index 76d198d796f..914185a1b8b 100644 --- a/code/game/gamemodes/changeling/changeling.dm +++ b/code/game/gamemodes/changeling/changeling.dm @@ -120,9 +120,9 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon" var/datum/objective/escape/escape_with_identity/identity_theft = new identity_theft.owner = changeling identity_theft.target = kill_objective.target + identity_theft.target_real_name = kill_objective.target.current.real_name //Whoops, forgot this. if(identity_theft.target && identity_theft.target.current) - var/target_real_name = identity_theft.target.current.real_name - identity_theft.explanation_text = "Escape on the shuttle or an escape pod with the identity of [target_real_name], the [identity_theft.target.assigned_role] while wearing their identification card." + identity_theft.explanation_text = "Escape on the shuttle or an escape pod with the identity of [identity_theft.target_real_name], the [identity_theft.target.assigned_role] while wearing their identification card." else identity_theft.explanation_text = "Free objective" changeling.objectives += identity_theft diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index e5157e50bd9..33d902b5ddf 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -745,12 +745,14 @@ datum/objective/absorb return 0 datum/objective/destroy + var/target_real_name find_target() var/list/possible_targets = active_ais(1) var/mob/living/silicon/ai/target_ai = pick(possible_targets) target = target_ai.mind if(target && target.current) - explanation_text = "Destroy [target.current.real_name], the experimental AI." + target_real_name = target.current.real_name + explanation_text = "Destroy [target_real_name], the AI." else explanation_text = "Free Objective" return target