Cleans up other components destroys (#38930)

* wearertargeting destroy

* Why did these variables even existed.

* ....
This commit is contained in:
AnturK
2018-07-06 18:39:08 +02:00
committed by yogstation13-bot
parent 98b95ff548
commit 7126ec8050
3 changed files with 5 additions and 3 deletions

View File

@@ -70,6 +70,7 @@ GLOBAL_LIST_EMPTY(uplinks)
/datum/component/uplink/Destroy()
GLOB.uplinks -= src
gamemode = null
purchase_log = null
return ..()
/datum/component/uplink/proc/LoadTC(mob/user, obj/item/stack/telecrystal/TC, silent = FALSE)

View File

@@ -20,3 +20,7 @@
/datum/component/wearertargeting/proc/on_drop(mob/user)
UnregisterSignal(user, signals)
/datum/component/wearertargeting/Destroy()
QDEL_NULL(callback) //is likely to ourselves.
return ..()

View File

@@ -3,12 +3,10 @@ GLOBAL_LIST(uplink_purchase_logs_by_key) //assoc key = /datum/uplink_purchase_lo
/datum/uplink_purchase_log
var/owner
var/list/purchase_log //assoc path-of-item = /datum/uplink_purchase_entry
var/datum/component/uplink/parent
var/total_spent = 0
/datum/uplink_purchase_log/New(_owner, datum/component/uplink/_parent)
owner = _owner
parent = _parent
LAZYINITLIST(GLOB.uplink_purchase_logs_by_key)
if(owner)
if(GLOB.uplink_purchase_logs_by_key[owner])
@@ -19,7 +17,6 @@ GLOBAL_LIST(uplink_purchase_logs_by_key) //assoc key = /datum/uplink_purchase_lo
/datum/uplink_purchase_log/Destroy()
purchase_log = null
parent = null
if(GLOB.uplink_purchase_logs_by_key[owner] == src)
GLOB.uplink_purchase_logs_by_key -= owner
return ..()