Merge pull request #11882 from Putnam3145/fix-deleting-objectives
Makes objectives clean theirselves up properly
This commit is contained in:
@@ -19,6 +19,15 @@ GLOBAL_LIST_EMPTY(objectives)
|
||||
if(text)
|
||||
explanation_text = text
|
||||
|
||||
/datum/objective/Destroy(force, ...)
|
||||
GLOB.objectives -= src
|
||||
if(owner)
|
||||
for(var/datum/antagonist/A in owner.antag_datums)
|
||||
A.objectives -= src
|
||||
if(team)
|
||||
team.objectives -= src
|
||||
. = ..()
|
||||
|
||||
/datum/objective/proc/get_owners() // Combine owner and team into a single list.
|
||||
. = (team && team.members) ? team.members.Copy() : list()
|
||||
if(owner)
|
||||
|
||||
Reference in New Issue
Block a user