From 8e1d6717b769c1d11ad70c6a8d0db1fb31d9852a Mon Sep 17 00:00:00 2001 From: Kashargul Date: Sun, 9 Jun 2024 17:51:59 +0200 Subject: [PATCH] some GC things --- code/game/objects/effects/decals/cleanable.dm | 2 +- code/modules/admin/verbs/modify_robot.dm | 6 +++--- code/modules/mob/living/silicon/robot/robot.dm | 2 +- code/modules/vore/eating/digest_act_vr.dm | 4 ++-- code/modules/xenobio2/mob/xeno.dm | 5 ++--- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/code/game/objects/effects/decals/cleanable.dm b/code/game/objects/effects/decals/cleanable.dm index 0665a088b39..8d8e52f6f1a 100644 --- a/code/game/objects/effects/decals/cleanable.dm +++ b/code/game/objects/effects/decals/cleanable.dm @@ -26,7 +26,7 @@ generic_filth = TRUE means when the decal is saved, it will be switched out for /obj/effect/decal/cleanable/Destroy() SSpersistence.forget_value(src, /datum/persistent/filth) - qdel(jan_icon) + QDEL_NULL(jan_icon) . = ..() /obj/effect/decal/cleanable/clean_blood(var/ignore = 0) diff --git a/code/modules/admin/verbs/modify_robot.dm b/code/modules/admin/verbs/modify_robot.dm index f381c069681..4d4f0096b96 100644 --- a/code/modules/admin/verbs/modify_robot.dm +++ b/code/modules/admin/verbs/modify_robot.dm @@ -76,7 +76,7 @@ var/obj/item/weapon/robot_module/robot/robot_type = new module_type(robot) robot.emag_items = 1 if(!istype(robot_type, /obj/item/weapon/robot_module/robot/)) - robot.Destroy() + qdel(robot) break var/list/all_modules = robot.module.modules all_modules += robot.module.emag @@ -134,7 +134,7 @@ target.module.synths.Add(item_with_matter.plastic) else item_with_matter.plastic = target.module.synths[found] - robot.Destroy() + qdel(robot) if(MODIFIY_ROBOT_MODULE_REMOVE) while(TRUE) var/list/active_modules = target.module.modules @@ -326,7 +326,7 @@ target.hud_used.update_robot_modules_display(TRUE) target.modtype = initial(target.modtype) target.module.Reset(target) - target.module.Destroy() + qdel(target.module) target.modtype = selected_module var/module_type = robot_modules[selected_module] target.transform_with_anim() diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 858a253c0be..d53aef5f718 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -836,7 +836,7 @@ if(notify) notify_ai(ROBOT_NOTIFICATION_MODULE_RESET, module.name) module.Reset(src) - module.Destroy() + qdel(module) module = null updatename("Default") has_recoloured = FALSE diff --git a/code/modules/vore/eating/digest_act_vr.dm b/code/modules/vore/eating/digest_act_vr.dm index 1979fc925c2..186f1ec215d 100644 --- a/code/modules/vore/eating/digest_act_vr.dm +++ b/code/modules/vore/eating/digest_act_vr.dm @@ -11,7 +11,7 @@ P.id = null for(var/mob/living/voice/V in possessed_voice) // Delete voices. - V.Destroy() //Destroy the voice. + qdel(V) for(var/mob/living/M in contents)//Drop mobs from objects(shoes) before deletion M.forceMove(item_storage) for(var/obj/item/O in contents) @@ -44,7 +44,7 @@ if(P.id) P.id = null for(var/mob/living/voice/V in possessed_voice) // Delete voices. - V.Destroy() //Destroy the voice. + qdel(V) for(var/mob/living/M in contents)//Drop mobs from objects(shoes) before deletion M.forceMove(item_storage) for(var/obj/item/O in contents) diff --git a/code/modules/xenobio2/mob/xeno.dm b/code/modules/xenobio2/mob/xeno.dm index 9996be9e613..f53659b17b7 100644 --- a/code/modules/xenobio2/mob/xeno.dm +++ b/code/modules/xenobio2/mob/xeno.dm @@ -102,6 +102,5 @@ Also includes Life and New ..() /mob/living/simple_mob/xeno/Destroy() - traitdat.Destroy() //Let's clean up after ourselves. - traitdat = null - ..() \ No newline at end of file + QDEL_NULL(traitdat) + ..()