Objective bugfixes.

- Should fix the assigning of the identity theft objectives
- Fixes changelings greentexting identity theft when they shouldn't.
- Possibly fixes AI name issue with destroy objective.
This commit is contained in:
DZD
2015-02-11 19:03:46 -05:00
parent 017c63dfa2
commit 33b69df330
3 changed files with 19 additions and 5 deletions
+14 -2
View File
@@ -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