Merge pull request #11882 from Putnam3145/fix-deleting-objectives

Makes objectives clean theirselves up properly
This commit is contained in:
Ghom
2020-04-18 01:20:02 +02:00
committed by GitHub
+9
View File
@@ -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)