diff --git a/code/_helpers/unsorted.dm b/code/_helpers/unsorted.dm index 2b75414a7e..63bac6e134 100644 --- a/code/_helpers/unsorted.dm +++ b/code/_helpers/unsorted.dm @@ -1294,6 +1294,13 @@ var/mob/dview/dview_mob = new else living_mob_list -= src +/mob/dview/Destroy(var/force) + crash_with("Attempt to delete the dview_mob: [log_info_line(src)]") + if (!force) + return QDEL_HINT_LETMELIVE + global.dview_mob = new + return ..() + // call to generate a stack trace and print to runtime logs /proc/crash_with(msg) CRASH(msg) diff --git a/code/_onclick/hud/ability_screen_objects.dm b/code/_onclick/hud/ability_screen_objects.dm index 2081e011b3..d29ef9dd96 100644 --- a/code/_onclick/hud/ability_screen_objects.dm +++ b/code/_onclick/hud/ability_screen_objects.dm @@ -20,7 +20,7 @@ message_admins("ERROR: ability_master's New() was not given an owner argument. This is a bug.") /obj/screen/movable/ability_master/Destroy() - ..() + . = ..() //Get rid of the ability objects. remove_all_abilities() ability_objects.Cut() diff --git a/code/_onclick/hud/action.dm b/code/_onclick/hud/action.dm index 9781e9c236..7e03151fd6 100644 --- a/code/_onclick/hud/action.dm +++ b/code/_onclick/hud/action.dm @@ -30,6 +30,9 @@ /datum/action/Destroy() if(owner) Remove(owner) + target = null + qdel_null(button) + return ..() /datum/action/proc/Grant(mob/living/T) if(owner) @@ -45,7 +48,7 @@ if(button) if(T.client) T.client.screen -= button - del(button) + qdel_null(button) T.actions.Remove(src) T.update_action_buttons() owner = null diff --git a/code/_onclick/hud/hud.dm b/code/_onclick/hud/hud.dm index 45c6f7e277..0f6990f681 100644 --- a/code/_onclick/hud/hud.dm +++ b/code/_onclick/hud/hud.dm @@ -155,7 +155,7 @@ datum/hud/New(mob/owner) ..() /datum/hud/Destroy() - ..() + . = ..() grab_intent = null hurt_intent = null disarm_intent = null diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index e55323fb3a..35ef300978 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -46,7 +46,7 @@ var/obj/item/owner /obj/screen/item_action/Destroy() - ..() + . = ..() owner = null /obj/screen/item_action/Click() diff --git a/code/_onclick/hud/spell_screen_objects.dm b/code/_onclick/hud/spell_screen_objects.dm index a599381730..e79db28713 100644 --- a/code/_onclick/hud/spell_screen_objects.dm +++ b/code/_onclick/hud/spell_screen_objects.dm @@ -13,7 +13,7 @@ var/mob/spell_holder /obj/screen/movable/spell_master/Destroy() - ..() + . = ..() for(var/obj/screen/spell/spells in spell_objects) spells.spellmaster = null spell_objects.Cut() @@ -156,7 +156,7 @@ var/icon/last_charged_icon /obj/screen/spell/Destroy() - ..() + . = ..() spell = null last_charged_icon = null if(spellmaster) diff --git a/code/controllers/communications.dm b/code/controllers/communications.dm index 796fb0b664..332ab9af52 100644 --- a/code/controllers/communications.dm +++ b/code/controllers/communications.dm @@ -314,7 +314,6 @@ var/global/datum/controller/radio/radio_controller devices_line -= null if (devices_line.len==0) devices -= devices_filter - del(devices_line) /datum/signal var/obj/source diff --git a/code/controllers/voting.dm b/code/controllers/voting.dm index aa06984f69..ba1bb23c33 100644 --- a/code/controllers/voting.dm +++ b/code/controllers/voting.dm @@ -23,9 +23,15 @@ var/global/list/round_voters = list() // Keeps track of the individuals voting f /datum/controller/vote/New() if(vote != src) if(istype(vote)) - del(vote) + Recover() + qdel(vote) vote = src +/datum/controller/vote/Destroy() + ..() + // Tell qdel() to Del() this object. + return QDEL_HINT_HARDDEL_NOW + /datum/controller/vote/proc/process() //called by master_controller if(mode) // No more change mode votes after the game has started. diff --git a/code/datums/wires/wires.dm b/code/datums/wires/wires.dm index 066c357a22..c1ee225dce 100644 --- a/code/datums/wires/wires.dm +++ b/code/datums/wires/wires.dm @@ -48,6 +48,7 @@ var/list/wireColours = list("red", "blue", "green", "darkred", "orange", "brown" /datum/wires/Destroy() holder = null + signallers.Cut() return ..() /datum/wires/proc/GenerateWires() diff --git a/code/game/machinery/doors/airlock_control.dm b/code/game/machinery/doors/airlock_control.dm index 805bb7dba9..ba8aa85b2c 100644 --- a/code/game/machinery/doors/airlock_control.dm +++ b/code/game/machinery/doors/airlock_control.dm @@ -145,7 +145,7 @@ obj/machinery/door/airlock/New() obj/machinery/door/airlock/Destroy() if(frequency && radio_controller) radio_controller.remove_object(src,frequency) - ..() + return ..() obj/machinery/airlock_sensor icon = 'icons/obj/airlock_machines.dmi' @@ -220,7 +220,7 @@ obj/machinery/airlock_sensor/New() obj/machinery/airlock_sensor/Destroy() if(radio_controller) radio_controller.remove_object(src,frequency) - ..() + return ..() obj/machinery/airlock_sensor/airlock_interior command = "cycle_interior" @@ -292,7 +292,7 @@ obj/machinery/access_button/New() obj/machinery/access_button/Destroy() if(radio_controller) radio_controller.remove_object(src, frequency) - ..() + return ..() obj/machinery/access_button/airlock_interior frequency = 1379 diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index 158b718e83..e0156196d6 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -202,7 +202,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/ /obj/machinery/hologram/holopad/Destroy() for (var/mob/living/silicon/ai/master in masters) clear_holo(master) - ..() + return ..() /* Holographic project of everything else. diff --git a/code/game/machinery/pipe/pipelayer.dm b/code/game/machinery/pipe/pipelayer.dm index 40726825a1..c960879e54 100644 --- a/code/game/machinery/pipe/pipelayer.dm +++ b/code/game/machinery/pipe/pipelayer.dm @@ -23,9 +23,8 @@ update_icon() /obj/machinery/pipelayer/Destroy() - qdel(W) - W = null - ..() + qdel_null(W) + . = ..() /obj/machinery/pipelayer/RefreshParts() var/mb_rating = 0 diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm index 8dfe627030..c963a902bb 100644 --- a/code/game/objects/buckling.dm +++ b/code/game/objects/buckling.dm @@ -21,11 +21,6 @@ if(can_buckle && istype(M)) user_buckle_mob(M, user) -//Cleanup -/obj/Del() - unbuckle_mob() - return ..() - /obj/Destroy() unbuckle_mob() return ..() diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index 88f69d8011..7f1d83cc4a 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -1470,8 +1470,12 @@ var/global/list/obj/item/device/pda/PDAs = list() /obj/item/device/pda/Destroy() PDAs -= src if (src.id && prob(90)) //IDs are kept in 90% of the cases - src.id.loc = get_turf(src.loc) - ..() + src.id.forceMove(get_turf(src.loc)) + else + qdel_null(src.id) + qdel_null(src.cartridge) + qdel_null(src.pai) + return ..() /obj/item/device/pda/clown/Crossed(AM as mob|obj) //Clown PDA is slippery. if (istype(AM, /mob/living)) diff --git a/code/game/objects/items/devices/PDA/cart.dm b/code/game/objects/items/devices/PDA/cart.dm index 2c4368736e..c53ba712db 100644 --- a/code/game/objects/items/devices/PDA/cart.dm +++ b/code/game/objects/items/devices/PDA/cart.dm @@ -78,6 +78,10 @@ var/list/civilian_cartridges = list( var/message2 var/list/stored_data = list() +/obj/item/weapon/cartridge/Destroy() + qdel_null(radio) + return ..() + /obj/item/weapon/cartridge/engineering name = "\improper Power-ON cartridge" icon_state = "cart-e" @@ -164,10 +168,6 @@ var/list/civilian_cartridges = list( radio = new /obj/item/radio/integrated/signal(src) ..() -/obj/item/weapon/cartridge/signal/Destroy() - qdel(radio) - ..() - /obj/item/weapon/cartridge/quartermaster name = "\improper Space Parts & Space Vendors cartridge" desc = "Perfect for the Quartermaster on the go!" diff --git a/code/game/objects/items/devices/communicator/communicator.dm b/code/game/objects/items/devices/communicator/communicator.dm index 018be58705..8630d6a602 100644 --- a/code/game/objects/items/devices/communicator/communicator.dm +++ b/code/game/objects/items/devices/communicator/communicator.dm @@ -803,7 +803,7 @@ var/global/list/obj/item/device/communicator/all_communicators = list() if(exonet) exonet.remove_address() exonet = null - ..() + return ..() // Proc: update_icon() // Parameters: None diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm index 8e9a72d203..106d144834 100644 --- a/code/game/objects/items/devices/radio/intercom.dm +++ b/code/game/objects/items/devices/radio/intercom.dm @@ -96,7 +96,7 @@ /obj/item/device/radio/intercom/Destroy() processing_objects -= src - ..() + return ..() /obj/item/device/radio/intercom/attack_ai(mob/user as mob) src.add_fingerprint(user) diff --git a/code/game/objects/items/weapons/material/material_armor.dm b/code/game/objects/items/weapons/material/material_armor.dm index 1041fb5d1f..990ae37659 100644 --- a/code/game/objects/items/weapons/material/material_armor.dm +++ b/code/game/objects/items/weapons/material/material_armor.dm @@ -42,7 +42,7 @@ Protectiveness | Armor % /obj/item/clothing/Destroy() processing_objects -= src - ..() + return ..() /obj/item/clothing/get_material() return material diff --git a/code/game/objects/items/weapons/mop_deploy.dm b/code/game/objects/items/weapons/mop_deploy.dm index 8baab87528..30a6991a53 100644 --- a/code/game/objects/items/weapons/mop_deploy.dm +++ b/code/game/objects/items/weapons/mop_deploy.dm @@ -26,7 +26,7 @@ T.dirt = 0 for(var/obj/effect/O in src) if(istype(O,/obj/effect/rune) || istype(O,/obj/effect/decal/cleanable) || istype(O,/obj/effect/overlay)) - del(O) + qdel(O) /* //Reagent code changed at some point and the below doesn't work. To be fixed later. source.reagents.reaction(src, TOUCH, 10) //10 is the multiplier for the reaction effect. probably needed to wet the floor properly. source.reagents.remove_any(1) //reaction() doesn't use up the reagents @@ -47,16 +47,16 @@ return ..() -/obj/item/weapon/mop_deploy/Del() +/obj/item/weapon/mop_deploy/Destroy() processing_objects -= src - ..() + . = ..() /obj/item/weapon/mop_deploy/attack_self(mob/user as mob) user.drop_from_inventory(src) - spawn(1) if(src) del(src) + spawn(1) if(!QDELETED(src)) qdel(src) /obj/item/weapon/mop_deploy/dropped() - spawn(1) if(src) del(src) + spawn(1) if(!QDELETED(src)) qdel(src) /obj/item/weapon/mop_deploy/process() if(!creator || loc != creator || !creator.item_is_in_hands(src)) @@ -71,4 +71,4 @@ host.pinned -= src host.embedded -= src host.drop_from_inventory(src) - spawn(1) if(src) del(src) \ No newline at end of file + spawn(1) if(!QDELETED(src)) qdel(src) \ No newline at end of file diff --git a/code/game/objects/items/weapons/storage/internal.dm b/code/game/objects/items/weapons/storage/internal.dm index 8d1898fe4b..1f1a5f6963 100644 --- a/code/game/objects/items/weapons/storage/internal.dm +++ b/code/game/objects/items/weapons/storage/internal.dm @@ -12,7 +12,7 @@ /obj/item/weapon/storage/internal/Destroy() master_item = null - ..() + . = ..() /obj/item/weapon/storage/internal/attack_hand() return //make sure this is never picked up diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index 3846a44d2b..db55e95b44 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -38,15 +38,15 @@ /obj/item/weapon/storage/Destroy() close_all() - qdel(boxes) - qdel(src.storage_start) - qdel(src.storage_continue) - qdel(src.storage_end) - qdel(src.stored_start) - qdel(src.stored_continue) - qdel(src.stored_end) - qdel(closer) - ..() + 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(closer) + . = ..() /obj/item/weapon/storage/MouseDrop(obj/over_object as obj) if(!canremove) diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm index 57a5cf06a4..b8daa05d7f 100644 --- a/code/game/objects/items/weapons/tanks/tanks.dm +++ b/code/game/objects/items/weapons/tanks/tanks.dm @@ -44,8 +44,7 @@ var/list/global/tank_gauge_cache = list() return /obj/item/weapon/tank/Destroy() - if(air_contents) - qdel(air_contents) + qdel_null(air_contents) processing_objects.Remove(src) @@ -53,7 +52,7 @@ var/list/global/tank_gauge_cache = list() var/obj/item/device/transfer_valve/TTV = loc TTV.remove_tank(src) - ..() + return ..() /obj/item/weapon/tank/examine(mob/user) . = ..(user, 0) diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index eab315809f..b41743799b 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -49,9 +49,6 @@ if(climbable) verbs += /obj/structure/proc/climb_on -/obj/structure/Destroy() - ..() - /obj/structure/proc/climb_on() set name = "Climb structure" diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 809dd008a4..9175ddc28c 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -355,12 +355,9 @@ density = 0 update_nearby_tiles() var/turf/location = loc - loc = null + . = ..() for(var/obj/structure/window/W in orange(location, 1)) W.update_icon() - loc = location - ..() - /obj/structure/window/Move() var/ini_dir = dir diff --git a/code/modules/clothing/spacesuits/rig/modules/utility.dm b/code/modules/clothing/spacesuits/rig/modules/utility.dm index cec738479e..583f491d5e 100644 --- a/code/modules/clothing/spacesuits/rig/modules/utility.dm +++ b/code/modules/clothing/spacesuits/rig/modules/utility.dm @@ -477,7 +477,7 @@ for(var/obj/item/weapon/mop_deploy/blade in M.contents) M.drop_from_inventory(blade) - del(blade) + qdel(blade) //Space Cleaner Launcher @@ -520,7 +520,7 @@ user << "You slot \the [input_device] into the suit module." user.drop_from_inventory(input_device) - del(input_device) + qdel(input_device) accepted_item.charges++ return 1 diff --git a/code/modules/lighting/lighting_corner.dm b/code/modules/lighting/lighting_corner.dm index 63ce123253..088c53e521 100644 --- a/code/modules/lighting/lighting_corner.dm +++ b/code/modules/lighting/lighting_corner.dm @@ -131,3 +131,9 @@ /datum/lighting_corner/dummy/New() return + +/datum/lighting_corner/Destroy(var/force) + if (!force) + return QDEL_HINT_LETMELIVE + crash_with("Who decided to force qdel() a lighting corner? Why did you do this?") + return ..() diff --git a/code/modules/lighting/lighting_overlay.dm b/code/modules/lighting/lighting_overlay.dm index 6d912cd862..690eba9326 100644 --- a/code/modules/lighting/lighting_overlay.dm +++ b/code/modules/lighting/lighting_overlay.dm @@ -39,7 +39,7 @@ log_debug("A lighting overlay realised its loc was NOT a turf (actual loc: [loc][loc ? ", " + loc.type : "null"]) in update_overlay() and got qdel'ed!") else log_debug("A lighting overlay realised it was in nullspace in update_overlay() and got pooled!") - qdel(src) + qdel(src, force=TRUE) return // To the future coder who sees this and thinks @@ -121,14 +121,17 @@ /atom/movable/lighting_overlay/throw_at() return 0 -/atom/movable/lighting_overlay/Destroy() - total_lighting_overlays-- - global.lighting_update_overlays -= src - global.lighting_update_overlays_old -= src +/atom/movable/lighting_overlay/Destroy(var/force) + if (force) + total_lighting_overlays-- + global.lighting_update_overlays -= src + global.lighting_update_overlays_old -= src - var/turf/T = loc - if(istype(T)) - T.lighting_overlay = null - T.luminosity = 1 + var/turf/T = loc + if(istype(T)) + T.lighting_overlay = null + T.luminosity = 1 - . = ..() + return ..() + else + return QDEL_HINT_LETMELIVE diff --git a/code/modules/mob/freelook/ai/eye.dm b/code/modules/mob/freelook/ai/eye.dm index 62f0d93152..a1c28a4af3 100644 --- a/code/modules/mob/freelook/ai/eye.dm +++ b/code/modules/mob/freelook/ai/eye.dm @@ -59,7 +59,7 @@ /mob/living/silicon/ai/Destroy() destroy_eyeobj() - ..() + return ..() /atom/proc/move_camera_by_click() if(istype(usr, /mob/living/silicon/ai)) diff --git a/code/modules/mob/freelook/ai/update_triggers.dm b/code/modules/mob/freelook/ai/update_triggers.dm index f4fea0aa58..5c21c6784d 100644 --- a/code/modules/mob/freelook/ai/update_triggers.dm +++ b/code/modules/mob/freelook/ai/update_triggers.dm @@ -59,7 +59,7 @@ /obj/machinery/camera/Destroy() clear_all_networks() cameranet.cameras -= src - ..() + return ..() // Mobs /mob/living/silicon/ai/rejuvenate() diff --git a/code/modules/mob/freelook/eye.dm b/code/modules/mob/freelook/eye.dm index 0c38ad8033..ff8681d128 100644 --- a/code/modules/mob/freelook/eye.dm +++ b/code/modules/mob/freelook/eye.dm @@ -38,7 +38,11 @@ mob/observer/eye/Destroy() qdel(ghostimage) ghostimage = null updateallghostimages() - ..() + if(owner) + if(owner.eyeobj == src) + owner.eyeobj = null + owner = null + . = ..() /mob/observer/eye/Move(n, direct) if(owner == src) diff --git a/code/modules/mob/freelook/mask/update_triggers.dm b/code/modules/mob/freelook/mask/update_triggers.dm index 1142367164..1dd520e7f1 100644 --- a/code/modules/mob/freelook/mask/update_triggers.dm +++ b/code/modules/mob/freelook/mask/update_triggers.dm @@ -25,7 +25,7 @@ /mob/living/Destroy() cultnet.updateVisibility(src, 0) - ..() + return ..() /mob/living/rejuvenate() var/was_dead = stat == DEAD diff --git a/code/modules/mob/freelook/update_triggers.dm b/code/modules/mob/freelook/update_triggers.dm index 8408083ba8..482025426e 100644 --- a/code/modules/mob/freelook/update_triggers.dm +++ b/code/modules/mob/freelook/update_triggers.dm @@ -15,7 +15,7 @@ /turf/simulated/Destroy() updateVisibility(src) - ..() + return ..() /turf/simulated/New() ..() @@ -26,7 +26,7 @@ /obj/structure/Destroy() updateVisibility(src) - ..() + return ..() /obj/structure/New() ..() diff --git a/code/modules/mob/freelook/visualnet.dm b/code/modules/mob/freelook/visualnet.dm index 24ad252eda..0d53d1e48a 100644 --- a/code/modules/mob/freelook/visualnet.dm +++ b/code/modules/mob/freelook/visualnet.dm @@ -14,7 +14,7 @@ /datum/visualnet/Destroy() visual_nets -= src - ..() + return ..() // Checks if a chunk has been Generated in x, y, z. /datum/visualnet/proc/chunkGenerated(x, y, z) diff --git a/code/modules/mob/holder.dm b/code/modules/mob/holder.dm index 1998e7fe65..5d0796f77c 100644 --- a/code/modules/mob/holder.dm +++ b/code/modules/mob/holder.dm @@ -27,7 +27,7 @@ var/list/holder_mob_icon_cache = list() /obj/item/weapon/holder/Destroy() processing_objects.Remove(src) - ..() + return ..() /obj/item/weapon/holder/process() update_state() diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 8583521f85..a22011e8ab 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -215,20 +215,15 @@ var/list/ai_verbs_hidden = list( // For why this exists, refer to https://xkcd.c /mob/living/silicon/ai/Destroy() ai_list -= src - qdel(eyeobj) - eyeobj = null - - qdel(psupply) - psupply = null - - qdel(aiMulti) - aiMulti = null - - qdel(aiRadio) - aiRadio = null - - qdel(aiCamera) - aiCamera = null + qdel_null(announcement) + qdel_null(eyeobj) + qdel_null(psupply) + qdel_null(aiPDA) + qdel_null(aiCommunicator) + qdel_null(aiMulti) + qdel_null(aiRadio) + qdel_null(aiCamera) + hack = null return ..() diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index 40b1852528..b74b7d6cf7 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -41,7 +41,7 @@ silicon_mob_list -= src for(var/datum/alarm_handler/AH in alarm_manager.all_handlers) AH.unregister_alarm(src) - ..() + return ..() /mob/living/silicon/proc/init_id() if(idcard) diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 3ad6260813..0e121e1481 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -195,7 +195,7 @@ friends.Cut() //This one is not walk_list.Cut() languages.Cut() - ..() + return ..() //Client attached /mob/living/simple_animal/Login() diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index be114228de..890ff2e873 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -393,9 +393,6 @@ /obj/item/weapon/grab/proc/size_difference(mob/A, mob/B) return mob_size_difference(A.mob_size, B.mob_size) -/obj/item/weapon/grab - var/destroying = 0 - /obj/item/weapon/grab/Destroy() animate(affecting, pixel_x = 0, pixel_y = 0, 4, 1, LINEAR_EASING) affecting.layer = 4 @@ -408,5 +405,4 @@ assailant = null qdel(hud) hud = null - destroying = 1 // stops us calling qdel(src) on dropped() - ..() + return ..() diff --git a/code/modules/mob/modifiers.dm b/code/modules/mob/modifiers.dm index f67ffc374b..0b39c9e275 100644 --- a/code/modules/mob/modifiers.dm +++ b/code/modules/mob/modifiers.dm @@ -73,7 +73,7 @@ /mob/living/Destroy() remove_all_modifiers(TRUE) - ..() + return ..() // Called by Life(). /mob/living/proc/handle_modifiers() diff --git a/code/modules/power/breaker_box.dm b/code/modules/power/breaker_box.dm index e133f82e6e..2b10a9017d 100644 --- a/code/modules/power/breaker_box.dm +++ b/code/modules/power/breaker_box.dm @@ -20,7 +20,7 @@ var/update_locked = 0 /obj/machinery/power/breakerbox/Destroy() - ..() + . = ..() for(var/datum/nano_module/rcon/R in world) R.FindDevices() diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 2d53277590..ebfa533086 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -108,7 +108,7 @@ var/list/possible_cable_coil_colours = list( if(powernet) cut_cable_from_powernet() // update the powernets cable_list -= src //remove it from global cable list - ..() // then go ahead and delete the cable + return ..() // then go ahead and delete the cable // Ghost examining the cable -> tells him the power /obj/structure/cable/attack_ghost(mob/user) diff --git a/code/modules/power/grid_checker.dm b/code/modules/power/grid_checker.dm index 4d42d4ca3f..b8a123e02f 100644 --- a/code/modules/power/grid_checker.dm +++ b/code/modules/power/grid_checker.dm @@ -28,7 +28,7 @@ /obj/machinery/power/grid_checker/Destroy() qdel(wires) wires = null - ..() + return ..() /obj/machinery/power/grid_checker/update_icon() if(power_failing) diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index 09921cf58b..850d7a84aa 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -248,7 +248,7 @@ if(A) on = 0 // A.update_lights() - ..() + return ..() /obj/machinery/light/update_icon() diff --git a/code/modules/power/power.dm b/code/modules/power/power.dm index 13213c2e7e..76320db479 100644 --- a/code/modules/power/power.dm +++ b/code/modules/power/power.dm @@ -19,7 +19,7 @@ disconnect_from_network() disconnect_terminal() - ..() + return ..() /////////////////////////////// // General procedures diff --git a/code/modules/power/singularity/collector.dm b/code/modules/power/singularity/collector.dm index 47a9c08923..53e3dc29c9 100644 --- a/code/modules/power/singularity/collector.dm +++ b/code/modules/power/singularity/collector.dm @@ -23,7 +23,7 @@ var/global/list/rad_collectors = list() /obj/machinery/power/rad_collector/Destroy() rad_collectors -= src - ..() + return ..() /obj/machinery/power/rad_collector/process() //so that we don't zero out the meter if the SM is processed first. diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm index 12540c2d04..b6c45475cc 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm @@ -205,7 +205,7 @@ if(holder && holder.my_atom && ismob(holder.my_atom)) var/mob/M = holder.my_atom M.status_flags &= ~FAKEDEATH - ..() + return ..() /datum/reagent/toxin/fertilizer //Reagents used for plant fertilizers. name = "fertilizer" diff --git a/code/modules/tables/update_triggers.dm b/code/modules/tables/update_triggers.dm index a90e3eeb8a..b7c087f9c0 100644 --- a/code/modules/tables/update_triggers.dm +++ b/code/modules/tables/update_triggers.dm @@ -6,12 +6,10 @@ /obj/structure/window/Destroy() var/oldloc = loc - loc=null + . = ..() for(var/obj/structure/table/T in view(oldloc, 1)) T.update_connections() T.update_icon() - loc=oldloc - ..() /obj/structure/window/Move() var/oldloc = loc diff --git a/code/world.dm b/code/world.dm index 8d51f84b47..a11d875c51 100644 --- a/code/world.dm +++ b/code/world.dm @@ -26,7 +26,8 @@ var/global/datum/global_init/init = new () qdel(src) //we're done /datum/global_init/Destroy() - return 1 + global.init = null + return 2 // QDEL_HINT_IWILLGC /world mob = /mob/new_player diff --git a/maps/RandomZLevels/stationCollision.dm b/maps/RandomZLevels/stationCollision.dm index fa20f440ec..0ebf12f169 100644 --- a/maps/RandomZLevels/stationCollision.dm +++ b/maps/RandomZLevels/stationCollision.dm @@ -54,7 +54,7 @@ B.item_state = "melted" new /obj/item/weapon/paper/sc_safehint_paper_bible(B) new /obj/item/weapon/pen(B) - del(src) + qdel(src) /* * Guns - I'm making these specifically so that I dont spawn a pile of fully loaded weapons on the map. @@ -189,7 +189,7 @@ var/sc_safecode5 = "[rand(0,9)]" else if(istype(A,/obj/)) var/obj/O = A O.ex_act(1.0) - if(O) del(O) + if(O) qdel(O) else if(isturf(A)) var/turf/T = A if(T.intact) diff --git a/maps/RandomZLevels/wildwest.dm b/maps/RandomZLevels/wildwest.dm index b3ae83b9d7..51ac498fb2 100644 --- a/maps/RandomZLevels/wildwest.dm +++ b/maps/RandomZLevels/wildwest.dm @@ -133,7 +133,7 @@ s.start() explosion(mob, 1, 0, 0, 0) spawn(0) - del(src) + qdel(src) /obj/effect/meatgrinder name = "Meat Grinder" diff --git a/maps/~map_system/maps.dm b/maps/~map_system/maps.dm index 1a575b3578..65797ebafa 100644 --- a/maps/~map_system/maps.dm +++ b/maps/~map_system/maps.dm @@ -161,5 +161,10 @@ var/list/all_maps = list() if(transit_chance) map.accessible_z_levels["[z]"] = transit_chance -/datum/map_z_level/Destroy() - return TRUE // No. +/datum/map_z_level/Destroy(var/force) + crash_with("Attempt to delete a map_z_level instance [log_info_line(src)]") + if(!force) + return QDEL_HINT_LETMELIVE // No. + if (using_map.zlevels["[z]"] == src) + using_map.zlevels -= "[z]" + return ..()