mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 11:05:03 +01:00
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:
+14
-2
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user