also added kill-once objectives

This commit is contained in:
Putnam
2020-01-31 12:25:19 -08:00
parent 29e0ac52c4
commit 809f57a15d
4 changed files with 36 additions and 6 deletions
+24
View File
@@ -173,6 +173,30 @@ GLOBAL_LIST_EMPTY(objectives)
/datum/objective/assassinate/admin_edit(mob/admin)
admin_simple_target_pick(admin)
/datum/objective/assassinate/once
name = "kill once"
var/won = FALSE
/datum/objective/assassinate/once/update_explanation_text()
..()
if(target && target.current)
explanation_text = "Kill [target.name], the [!target_role_type ? target.assigned_role : target.special_role]. You only need to kill [target.p_them()] once; if they come back, you've still succeeded."
else
explanation_text = "Free Objective"
/datum/objective/assassinate/once/find_target_by_role()
. = ..()
if(.)
START_PROCESSING(SSprocessing,src)
/datum/objective/assassinate/once/check_completion()
return won || ..()
/datum/objective/assassinate/once/process()
won = check_completion()
if(won)
STOP_PROCESSING(SSprocessing,src)
/datum/objective/assassinate/internal
var/stolen = 0 //Have we already eliminated this target?