Merge pull request #10335 from VOREStation/Arokha/dels

Various qdel helpers
This commit is contained in:
Aronai Sieyes
2021-05-20 15:04:37 -04:00
committed by Chompstation Bot
parent ad149bb509
commit bc6564deb6
8 changed files with 32 additions and 8 deletions

View File

@@ -111,6 +111,9 @@ GLOBAL_LIST_EMPTY(mannequins)
M = GLOB.mannequins[ckey]
return M
/proc/del_mannequin(var/ckey = "NULL")
GLOB.mannequins-= ckey
//////////////////////////
/////Initial Building/////
//////////////////////////

View File

@@ -266,7 +266,7 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
. = ..()
if(exonet)
exonet.remove_address()
exonet = null
qdel_null(exonet)
return ..()
// Proc: register_device()

View File

@@ -119,6 +119,9 @@ GLOBAL_LIST_BOILERPLATE(all_tracking_implants, /obj/item/weapon/implant/tracking
/obj/item/weapon/implant/tracking/Destroy()
STOP_PROCESSING(SSobj, src)
if(part)
part.implants -= src
part = imp_in = null
return ..()
/obj/item/weapon/implant/tracking/process()

View File

@@ -41,13 +41,18 @@
/obj/item/weapon/storage/Destroy()
close_all()
QDEL_NULL(boxes)
QDEL_NULL(src.storage_start)
QDEL_NULL(src.storage_continue)
QDEL_NULL(src.storage_end)
QDEL_NULL(src.stored_start)
QDEL_NULL(src.stored_continue)
QDEL_NULL(src.stored_end)
QDEL_NULL(storage_start)
QDEL_NULL(storage_continue)
QDEL_NULL(storage_end)
QDEL_NULL(stored_start)
QDEL_NULL(stored_continue)
QDEL_NULL(stored_end)
QDEL_NULL(closer)
if(ismob(loc))
var/mob/M = loc
M.remove_from_mob(src)
. = ..()
/obj/item/weapon/storage/MouseDrop(obj/over_object as obj)

View File

@@ -42,6 +42,8 @@ var/obj/effect/lobby_image = new /obj/effect/lobby_image
sight |= SEE_TURFS
player_list |= src
created_for = ckey
new_player_panel()
spawn(40)
if(client)

View File

@@ -7,6 +7,10 @@
my_client = null
..()
if(created_for)
del_mannequin(created_for)
if(!spawning)//Here so that if they are spawning and log out, the other procs can play out and they will have a mob to come back to.
key = null//We null their key before deleting the mob, so they are properly kicked out.
qdel(src)

View File

@@ -17,6 +17,8 @@
anchored = 1 // don't get pushed around
var/created_for
/mob/new_player/New()
mob_list += src
initialized = TRUE // Explicitly don't use Initialize(). New players join super early and use New()

View File

@@ -106,7 +106,12 @@
while(null in owner.organs)
owner.organs -= null
implants.Cut() //VOREStation Add - Remove these too!
for(var/imp in implants)
var/obj/item/weapon/implant/I = imp
if(!istype(I))
continue
I.imp_in = I.part = null
implants.Cut()
return ..()