I cant use : here, maintainers would kill me

This commit is contained in:
Contrabang
2022-09-26 10:57:38 -04:00
parent b3cd14d3ad
commit bb0f684579
2 changed files with 12 additions and 1 deletions
+2
View File
@@ -747,6 +747,8 @@
if(!new_objective)
return
new_objective.post_admin_creation()
if(objective)
remove_objective(objective)
if(objective_pos[2])
+10 -1
View File
@@ -89,6 +89,12 @@ GLOBAL_LIST_INIT(potential_theft_objectives, (subtypesof(/datum/theft_objective)
qdel(src)
owner?.announce_objectives()
/**
* Called when an admin creates a objective, allowing for variables to be set post-target selection
*/
/datum/objective/proc/post_admin_creation()
return
/datum/objective/assassinate
martyr_compatible = 1
@@ -351,6 +357,9 @@ GLOBAL_LIST_INIT(potential_theft_objectives, (subtypesof(/datum/theft_objective)
else
explanation_text = "Free Objective"
/datum/objective/escape/escape_with_identity/post_admin_creation()
target_real_name = target.current.real_name
/datum/objective/escape/escape_with_identity/check_completion()
if(!target_real_name)
return 1
@@ -359,7 +368,7 @@ GLOBAL_LIST_INIT(potential_theft_objectives, (subtypesof(/datum/theft_objective)
var/mob/living/carbon/human/H = owner.current
if(..())
if(H.dna.real_name == target_real_name)
if(H.get_id_name()== target_real_name)
if(H.get_id_name() == target_real_name)
return 1
return 0