diff --git a/code/controllers/garbage.dm b/code/controllers/garbage.dm index 3c96126c0f1..f488ea92aa0 100644 --- a/code/controllers/garbage.dm +++ b/code/controllers/garbage.dm @@ -3,13 +3,19 @@ #define GC_FORCE_DEL_PER_TICK 60 //#define GC_DEBUG -var/list/gc_hard_del_types = new +var/list/gc_hard_del_types = list() var/datum/garbage_collector/garbageCollector /client/proc/gc_dump_hdl() set name = "(GC) Hard Del List" set desc = "List types that are hard del()'d by the GC." set category = "Debug" + + if(!check_rights(R_DEBUG)) + return + + if(!gc_hard_del_types || !gc_hard_del_types.len) + usr << "No hard del()'d types found." for(var/A in gc_hard_del_types) usr << "[A] = [gc_hard_del_types[A]]" @@ -60,8 +66,7 @@ var/datum/garbage_collector/garbageCollector #endif AM.hard_deleted = 1 - if(!AM.type in gc_hard_del_types) - gc_hard_del_types += AM.type + gc_hard_del_types |= AM.type del AM hard_dels++ @@ -95,8 +100,7 @@ var/datum/garbage_collector/garbageCollector if(!istype(AM)) WARNING("qdel() passed object of type [AM.type]. qdel() can only handle /atom/movable types.") - if(!AM.type in gc_hard_del_types) - gc_hard_del_types += AM.type + gc_hard_del_types |= AM.type del(AM) garbageCollector.hard_dels++ garbageCollector.dels_count++ diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 905d47d36b8..2b0482bd57f 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -72,11 +72,11 @@ datum/mind if(current) //remove ourself from our old body's mind variable current.mind = null + nanomanager.user_transferred(current, new_character) + if(new_character.mind) //remove any mind currently in our new body's mind variable new_character.mind.current = null - nanomanager.user_transferred(current, new_character) - current = new_character //link ourself to our new body new_character.mind = src //and link our new body to ourself diff --git a/code/game/gamemodes/blob/overmind.dm b/code/game/gamemodes/blob/overmind.dm index 37b70de409a..c5be700afd4 100644 --- a/code/game/gamemodes/blob/overmind.dm +++ b/code/game/gamemodes/blob/overmind.dm @@ -30,7 +30,7 @@ /mob/camera/blob/Destroy() if (ghostimage) ghost_darkness_images -= ghostimage - qdel(ghostimage) + del(ghostimage) ghostimage = null; updateallghostimages() diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 87b60348e03..7ae495373e3 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -89,7 +89,7 @@ var/list/image/ghost_darkness_images = list() //this is a list of images for thi /mob/dead/observer/Destroy() if (ghostimage) ghost_darkness_images -= ghostimage - qdel(ghostimage) + del(ghostimage) ghostimage = null updateallghostimages() ..() diff --git a/code/modules/mob/living/silicon/ai/freelook/eye.dm b/code/modules/mob/living/silicon/ai/freelook/eye.dm index 50b60912107..01945aa86fd 100644 --- a/code/modules/mob/living/silicon/ai/freelook/eye.dm +++ b/code/modules/mob/living/silicon/ai/freelook/eye.dm @@ -26,7 +26,7 @@ /mob/aiEye/Destroy() if (ghostimage) ghost_darkness_images -= ghostimage - qdel(ghostimage) + del(ghostimage) ghostimage = null; updateallghostimages() diff --git a/code/modules/nano/nanomanager.dm b/code/modules/nano/nanomanager.dm index 1fd76dcf726..bb73178e94a 100644 --- a/code/modules/nano/nanomanager.dm +++ b/code/modules/nano/nanomanager.dm @@ -220,7 +220,7 @@ */ /datum/nanomanager/proc/user_transferred(var/mob/oldMob, var/mob/newMob) //testing("nanomanager/user_transferred from mob [oldMob.name] to mob [newMob.name]") - if (isnull(oldMob.open_uis) || !istype(oldMob.open_uis, /list) || open_uis.len == 0) + if (!oldMob || isnull(oldMob.open_uis) || !istype(oldMob.open_uis, /list) || open_uis.len == 0) //testing("nanomanager/user_transferred mob [oldMob.name] has no open uis") return 0 // has no open uis