diff --git a/__DEFINES/qdel.dm b/__DEFINES/qdel.dm new file mode 100644 index 00000000000..7c62cb74936 --- /dev/null +++ b/__DEFINES/qdel.dm @@ -0,0 +1,8 @@ +#define QDEL_NULL(item) qdel(item); item = null +#define QDEL_LIST(L) if(L) { for(var/I in L) { qdel(I); } } +#define QDEL_LIST_ASSOC(L) if(L) { for(var/I in L) { qdel(L[I]); qdel(I); } } + +#define QDEL_LIST_NULL(L) QDEL_LIST(L); L = null +#define QDEL_LIST_ASSOC_NULL(L) QDEL_LIST_ASSOC(L); L = null +#define QDEL_LIST_CUT(L) QDEL_LIST(L); L.Cut() +#define QDEL_LIST_ASSOC_CUT(L) QDEL_LIST_ASSOC(L); L.Cut() diff --git a/code/ATMOSPHERICS/components/unary/tank.dm b/code/ATMOSPHERICS/components/unary/tank.dm index 98d71eed5db..78247a8b5c2 100644 --- a/code/ATMOSPHERICS/components/unary/tank.dm +++ b/code/ATMOSPHERICS/components/unary/tank.dm @@ -168,8 +168,7 @@ node1.disconnect(src) node1 = null if(network) - qdel(network) - network = null + QDEL_NULL(network) update_icon() /obj/machinery/atmospherics/unary/tank/attackby(var/obj/item/weapon/W as obj, var/mob/user as mob) diff --git a/code/ATMOSPHERICS/datum_pipe_network.dm b/code/ATMOSPHERICS/datum_pipe_network.dm index d3eb0e8b6ed..f3277ca569b 100644 --- a/code/ATMOSPHERICS/datum_pipe_network.dm +++ b/code/ATMOSPHERICS/datum_pipe_network.dm @@ -28,8 +28,7 @@ pipe_networks -= src if(air_transient) - qdel(air_transient) - air_transient = null + QDEL_NULL(air_transient) radiate = null //This is a ref to an external gas_mixture, so it should not be deleted diff --git a/code/ATMOSPHERICS/datum_pipeline.dm b/code/ATMOSPHERICS/datum_pipeline.dm index c4cb42934d1..dda9359b86b 100644 --- a/code/ATMOSPHERICS/datum_pipeline.dm +++ b/code/ATMOSPHERICS/datum_pipeline.dm @@ -13,13 +13,11 @@ /datum/pipeline/Destroy() if(network) //For the pipenet rebuild - qdel(network) - network = null + QDEL_NULL(network) if(air) //For the pipeline rebuild next tick if(air.total_moles) temporarily_store_air() - qdel(air) - air = null + QDEL_NULL(air) //Null the fuck out of all these references for(var/obj/machinery/atmospherics/pipe/M in members) //Edges are a subset of members M.parent = null diff --git a/code/ATMOSPHERICS/pipe/construction.dm b/code/ATMOSPHERICS/pipe/construction.dm index 31cc416675a..e0f2d514ab0 100644 --- a/code/ATMOSPHERICS/pipe/construction.dm +++ b/code/ATMOSPHERICS/pipe/construction.dm @@ -568,8 +568,7 @@ var/list/manifold_pipes = list(PIPE_MANIFOLD4W, PIPE_INSUL_MANIFOLD4W, PIPE_HE_M else // If the pipe's still around, nuke it. if(P) - qdel(P) - P = null + QDEL_NULL(P) return 1 //TODO: DEFERRED diff --git a/code/ATMOSPHERICS/pipes.dm b/code/ATMOSPHERICS/pipes.dm index 095eca07507..bbafe9a51bc 100644 --- a/code/ATMOSPHERICS/pipes.dm +++ b/code/ATMOSPHERICS/pipes.dm @@ -96,8 +96,7 @@ /obj/machinery/atmospherics/pipe/Destroy() if(parent) - qdel(parent) - parent = null + QDEL_NULL(parent) for(var/obj/machinery/meter/M in src.loc) if(M.target == src) new /obj/item/pipe_meter(src.loc) diff --git a/code/__HELPERS/heap.dm b/code/__HELPERS/heap.dm index c860b2013ca..1c533b77a98 100644 --- a/code/__HELPERS/heap.dm +++ b/code/__HELPERS/heap.dm @@ -11,9 +11,7 @@ cmp = compare /datum/heap/Destroy(force, ...) - for(var/i in L) // because this is before the list helpers are loaded - qdel(i) - L = null + QDEL_LIST_NULL(L) // because this is before the list helpers are loaded return ..() /datum/heap/proc/is_empty() diff --git a/code/_onclick/hud/draggable.dm b/code/_onclick/hud/draggable.dm index ed516494414..c03cb6cdcc9 100644 --- a/code/_onclick/hud/draggable.dm +++ b/code/_onclick/hud/draggable.dm @@ -61,8 +61,7 @@ attachedmob.client.screen -= fuckbyond attachedmob = null if(fuckbyond) - qdel(fuckbyond) - fuckbyond = null + QDEL_NULL(fuckbyond) /obj/abstract/screen/draggable/MouseDown(turf/location,control,params) mouse_opacity = 0 //Because dragging wont occur when you are inside of your own src, we hide the src to mouses @@ -91,8 +90,7 @@ centerdist_x = over_location.x - attachedmob.x //maintains distance from usr in case usr moves centerdist_y = over_location.y - attachedmob.y if(fuckbyond) //This isn't a single click, therefore we can remove the FUCK BYOND object - qdel(fuckbyond) - fuckbyond = null + QDEL_NULL(fuckbyond) /obj/abstract/screen/draggable/MouseDrop(over_object,src_location,over_location,src_control,over_control,params) if(attachedobject) diff --git a/code/_onclick/hud/radial.dm b/code/_onclick/hud/radial.dm index b44d7a49cfb..2ee713c3d85 100644 --- a/code/_onclick/hud/radial.dm +++ b/code/_onclick/hud/radial.dm @@ -133,8 +133,7 @@ hide() current_user.radial_menus -= src if(custom_check) - qdel(custom_check) - custom_check = null + QDEL_NULL(custom_check) . = ..() ///////////////////// @@ -274,8 +273,7 @@ for(var/element in elements) qdel(element) elements.Cut() - qdel(close_button) - close_button = null + QDEL_NULL(close_button) current_page = 1 /datum/radial_menu/proc/element_chosen(choice_id,mob/user) @@ -429,7 +427,7 @@ if(anchor in current_user.radial_menu_anchors) return - if(close_other_menus) + if(close_other_menus) for(var/datum/radial_menu/R in current_user.radial_menus) R.finish() diff --git a/code/controllers/subsystem/garbage.dm b/code/controllers/subsystem/garbage.dm index 562f66dbfca..0785f117d01 100644 --- a/code/controllers/subsystem/garbage.dm +++ b/code/controllers/subsystem/garbage.dm @@ -262,9 +262,7 @@ List of hard deletions:"} registered_events = null gcDestroyed = "Bye, world!" tag = null - for(var/timer in active_timers) - qdel(timer) - active_timers = null + QDEL_LIST_NULL(active_timers) for(var/component_type in datum_components) qdel(datum_components[component_type]) datum_components = null diff --git a/code/datums/action.dm b/code/datums/action.dm index c6ad0b1ab52..b1950593136 100644 --- a/code/datums/action.dm +++ b/code/datums/action.dm @@ -35,8 +35,7 @@ if(owner) Remove(owner) target = null - qdel(button) - button = null + QDEL_NULL(button) return ..() /datum/action/proc/Grant(mob/M) @@ -244,4 +243,4 @@ var/obj/item/clothing/head/helmet/space/rig/R = target R.toggle_light(owner) return TRUE - return FALSE \ No newline at end of file + return FALSE diff --git a/code/datums/gamemode/dynamic/dynamic_rulesets_roundstart.dm b/code/datums/gamemode/dynamic/dynamic_rulesets_roundstart.dm index e43ab1607c0..60c670fcdec 100644 --- a/code/datums/gamemode/dynamic/dynamic_rulesets_roundstart.dm +++ b/code/datums/gamemode/dynamic/dynamic_rulesets_roundstart.dm @@ -758,8 +758,7 @@ Assign your candidates in choose_candidates() instead. for(var/obj/effect/landmark/A in landmarks_list) if(A.name in valid_landmark_lists) tag_mode_spawns += get_turf(A) - qdel(A) - A = null + QDEL_NULL(A) continue init_tag_mode_spawns() diff --git a/code/datums/gamemode/factions/bloodcult/bloodcult_buildings.dm b/code/datums/gamemode/factions/bloodcult/bloodcult_buildings.dm index 050d3636995..9eba73826f9 100644 --- a/code/datums/gamemode/factions/bloodcult/bloodcult_buildings.dm +++ b/code/datums/gamemode/factions/bloodcult/bloodcult_buildings.dm @@ -206,7 +206,7 @@ var/obj/effect/cult_offerings/offerings_effect var/mob/sacrificer // who started the sacrifice ritual - var/image/build + var/image/build var/list/watching_mobs = list() var/list/watcher_maps = list() @@ -285,7 +285,7 @@ S.pixel_y = 6 lock_atom(S, lock_type) if(S.stat != DEAD) - S.death() + S.death() I.add_blood() user.visible_message("\The [user] holds \the [I] above \the [S] and impales it on \the [src]!","You hold \the [I] above \the [S] and impale it on \the [src]!") else @@ -533,7 +533,7 @@ blade = null playsound(loc, 'sound/weapons/blade1.ogg', 50, 1) update_icon() - else + else blade.forceMove(loc) blade.attack_hand(user) to_chat(user, "You remove \the [blade] from \the [src]") @@ -692,7 +692,7 @@ if(!M.mind) to_chat(user, "\The [M] lacks a proper soul. They are an unsuitable sacrifice.") altar_task = ALTARTASK_NONE - return + return if((!istype(blade, /obj/item/weapon/melee/cultblade) && !istype(blade, /obj/item/weapon/melee/soulblade)) || istype(blade, /obj/item/weapon/melee/cultblade/nocult)) to_chat(user, "\The [blade] is too weak to perform such a sacrifice. Forge a stronger blade.") altar_task = ALTARTASK_NONE @@ -705,7 +705,7 @@ if(!locate(/datum/bloodcult_ritual/animal_sacrifice) in unlocked_rituals) to_chat(user, "Nar'sie has no interest in such a meager sacrifice at the moment.") altar_task = ALTARTASK_NONE - return + return timeleft = 15 timetotal = timeleft min_contributors = 1 @@ -877,7 +877,7 @@ if(R && R.is_open_container()) if(istype(M, /mob/living/simple_animal/mouse)) M.take_blood(R, min(remaining, 30)) - else + else M.take_blood(R, min(remaining, 60)) R.on_reagent_change() TriggerCultRitual(/datum/bloodcult_ritual/animal_sacrifice, sacrificer, list("mobtype" = M.type)) @@ -885,7 +885,7 @@ bloodmess_splatter(TU) playsound(src, 'sound/effects/cultjaunt_land.ogg', 30, 0, -3) flick("cult_jaunt_land",landing_animation) - + #undef ALTARTASK_NONE #undef ALTARTASK_GEM @@ -1191,8 +1191,7 @@ var/list/cult_spires = list() playsound(L, 'sound/effects/forge_over.ogg', 50, 0, -3) if (forger.client) forger.client.images -= progbar - qdel(forging) - forging = null + QDEL_NULL(forging) var/obj/item/I = new template(L) if (istype(I)) I.plane = relative_plane(EFFECTS_PLANE) @@ -2062,4 +2061,4 @@ var/list/bloodstone_list = list() /obj/structure/cult/pylon/New() ..() - flick("[icon_state]-spawn", src) \ No newline at end of file + flick("[icon_state]-spawn", src) diff --git a/code/datums/gamemode/factions/bloodcult/bloodcult_effects.dm b/code/datums/gamemode/factions/bloodcult/bloodcult_effects.dm index 78bae5e1e42..ee7ab614136 100644 --- a/code/datums/gamemode/factions/bloodcult/bloodcult_effects.dm +++ b/code/datums/gamemode/factions/bloodcult/bloodcult_effects.dm @@ -250,8 +250,7 @@ /obj/effect/bloodcult_jaunt/Destroy() if (rider) - qdel(rider) - rider = null + QDEL_NULL(rider) if (packed.len > 0) for(var/atom/A in packed) qdel(A) diff --git a/code/datums/gamemode/factions/bloodcult/bloodcult_items.dm b/code/datums/gamemode/factions/bloodcult/bloodcult_items.dm index b68bc737373..0f3676b80c6 100644 --- a/code/datums/gamemode/factions/bloodcult/bloodcult_items.dm +++ b/code/datums/gamemode/factions/bloodcult/bloodcult_items.dm @@ -1692,8 +1692,7 @@ var/list/arcane_tomes = list() stored_gear.Remove(I) I.forceMove(T) if (remaining) - qdel(remaining) - remaining = null + QDEL_NULL(remaining) ..() /obj/item/weapon/blood_tesseract/throw_impact(atom/hit_atom) diff --git a/code/datums/gamemode/factions/bloodcult/bloodcult_mobs_and_constructs.dm b/code/datums/gamemode/factions/bloodcult/bloodcult_mobs_and_constructs.dm index 39aef40c71b..e5a00bc0344 100644 --- a/code/datums/gamemode/factions/bloodcult/bloodcult_mobs_and_constructs.dm +++ b/code/datums/gamemode/factions/bloodcult/bloodcult_mobs_and_constructs.dm @@ -201,8 +201,7 @@ heal_target.healers.Remove(src) heal_target = null if (ray) - qdel(ray) - ray = null + QDEL_NULL(ray) /obj/effect/overlay/artificerray name = "ray" @@ -628,7 +627,7 @@ var/list/astral_projections = list() canmove = 0 incorporeal_move = 1 flying = 1 - flags = HEAR | TIMELESS | INVULNERABLE + flags = HEAR | TIMELESS | INVULNERABLE speed = 0.5 client.CAN_MOVE_DIAGONALLY = 1 overlay_fullscreen("astralborder", /obj/abstract/screen/fullscreen/astral_border) @@ -696,4 +695,4 @@ var/list/astral_projections = list() 0,1,0,0, 0,0,1,0, 0,0,0,1, - 0,0,0,0) \ No newline at end of file + 0,0,0,0) diff --git a/code/datums/gamemode/factions/bloodcult/bloodcult_runes.dm b/code/datums/gamemode/factions/bloodcult/bloodcult_runes.dm index bca80dbe433..5d6c106903c 100644 --- a/code/datums/gamemode/factions/bloodcult/bloodcult_runes.dm +++ b/code/datums/gamemode/factions/bloodcult/bloodcult_runes.dm @@ -65,8 +65,7 @@ var/list/rune_appearances_cache = list() for(var/mob/living/silicon/ai/AI in player_list) if (AI.client) AI.client.images -= blood_image - qdel(blood_image) - blood_image = null + QDEL_NULL(blood_image) if (word1) erase_word(word1.english,blood1) diff --git a/code/datums/gamemode/factions/bloodcult/bloodcult_runespells.dm b/code/datums/gamemode/factions/bloodcult/bloodcult_runespells.dm index c7f5e4fa31d..d9fef62e648 100644 --- a/code/datums/gamemode/factions/bloodcult/bloodcult_runespells.dm +++ b/code/datums/gamemode/factions/bloodcult/bloodcult_runespells.dm @@ -1563,7 +1563,7 @@ var/list/confusion_victims = list() M.update_fullscreen_alpha("deafborder", 0, 5) sleep(8) M.clear_fullscreen("deafborder", animate = 0) - if(activator && ritual_victim_count > 0) + if(activator && ritual_victim_count > 0) TriggerCultRitual(/datum/bloodcult_ritual/silence_lambs, activator, list("victimcount" = ritual_victim_count)) qdel(spell_holder) @@ -2891,12 +2891,12 @@ var/list/bloodcult_exitportals = list() vessel.my_appearance.g_eyes = 21 vessel.my_appearance.b_eyes = 21 vessel.my_appearance.s_tone = 45 // super duper albino - + // purely cosmetic tattoos. giving cultists some way to have tattoos until those get reworked newCultist.tattoos[TATTOO_POOL] = new /datum/cult_tattoo/bloodpool() newCultist.tattoos[TATTOO_HOLY] = new /datum/cult_tattoo/holy() newCultist.tattoos[TATTOO_MANIFEST] = new /datum/cult_tattoo/manifest() - + vessel.equip_or_collect(new /obj/item/clothing/under/rags(vessel), slot_w_uniform) M.regenerate_icons() diff --git a/code/datums/gamemode/factions/legacy_cult/cult.dm b/code/datums/gamemode/factions/legacy_cult/cult.dm index 2a5ca3e9ea8..e0f1e0670b3 100644 --- a/code/datums/gamemode/factions/legacy_cult/cult.dm +++ b/code/datums/gamemode/factions/legacy_cult/cult.dm @@ -361,8 +361,7 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa"," if (!S.target) // No targets still ? Time to reroll the objective. log_admin("LEGACY CULT: qdeling the objective...") objective_holder.objectives -= current_objective - qdel(current_objective) - current_objective = null + QDEL_NULL(current_objective) getNewObjective(debug = TRUE) // This objective never happened. return for (var/datum/role/R in members) diff --git a/code/datums/gamemode/factions/legacy_cult/cult_structures.dm b/code/datums/gamemode/factions/legacy_cult/cult_structures.dm index 18820a736ce..71dc0a749dc 100644 --- a/code/datums/gamemode/factions/legacy_cult/cult_structures.dm +++ b/code/datums/gamemode/factions/legacy_cult/cult_structures.dm @@ -167,8 +167,7 @@ if(istype(M, /mob/living/silicon/robot)) var/mob/living/silicon/robot/Robot = M if(Robot.mmi) - qdel(Robot.mmi) - Robot.mmi = null + QDEL_NULL(Robot.mmi) else for(var/obj/item/W in M) if(istype(W, /obj/item/weapon/implant)) //TODO: Carn. give implants a dropped() or something @@ -194,4 +193,4 @@ new_mob.key = M.key to_chat(new_mob, "Your form morphs into that of a cluwne.") -*/ \ No newline at end of file +*/ diff --git a/code/datums/gamemode/factions/legacy_cult/narsie.dm b/code/datums/gamemode/factions/legacy_cult/narsie.dm index e7cc16f119f..8038b49eccb 100644 --- a/code/datums/gamemode/factions/legacy_cult/narsie.dm +++ b/code/datums/gamemode/factions/legacy_cult/narsie.dm @@ -428,8 +428,7 @@ var/global/mr_clean_targets = list( var/mob/living/silicon/robot/R = L if (R.mmi) - qdel(R.mmi) // Nuke MMI. - R.mmi = null + QDEL_NULL(R.mmi) // Nuke MMI. qdel(L) // Just delete it. else if (is_type_in_list(A, mr_clean_targets)) qdel(A) diff --git a/code/datums/gamemode/factions/legacy_cult/ritual.dm b/code/datums/gamemode/factions/legacy_cult/ritual.dm index 6bcb7a2e4f2..40c39c1114b 100644 --- a/code/datums/gamemode/factions/legacy_cult/ritual.dm +++ b/code/datums/gamemode/factions/legacy_cult/ritual.dm @@ -47,8 +47,7 @@ var/runedec = 0 // Rune cap ? for(var/mob/living/silicon/ai/AI in player_list) if(AI.client) AI.client.images -= blood_image - qdel(blood_image) - blood_image = null + QDEL_NULL(blood_image) rune_list_legacy.Remove(src) ..() diff --git a/code/datums/gamemode/factions/legacy_cult/runes.dm b/code/datums/gamemode/factions/legacy_cult/runes.dm index a4376ae888a..31c0d272c55 100644 --- a/code/datums/gamemode/factions/legacy_cult/runes.dm +++ b/code/datums/gamemode/factions/legacy_cult/runes.dm @@ -39,8 +39,7 @@ spawn(10) if(c_animation) c_animation.master = null - qdel(c_animation) - c_animation = null + QDEL_NULL(c_animation) /////////////////////////////////////////FIRST RUNE /obj/effect/rune_legacy/proc/teleport(var/key) @@ -1409,29 +1408,25 @@ if("Juggernaut") var/mob/living/simple_animal/construct/armoured/C = new /mob/living/simple_animal/construct/armoured (get_turf(src.loc)) M.mind.transfer_to(C) - qdel(M) - M = null + QDEL_NULL(M) to_chat(C, "You are now a Juggernaut. Though slow, your shell can withstand extreme punishment, create temporary walls and even deflect energy weapons, and rip apart enemies and walls alike.") //ticker.mode.update_cult_icons_added(C.mind) if("Wraith") var/mob/living/simple_animal/construct/wraith/C = new /mob/living/simple_animal/construct/wraith (get_turf(src.loc)) M.mind.transfer_to(C) - qdel(M) - M = null + QDEL_NULL(M) to_chat(C, "You are a now Wraith. Though relatively fragile, you are fast, deadly, and even able to phase through walls.") //ticker.mode.update_cult_icons_added(C.mind) if("Artificer") var/mob/living/simple_animal/construct/builder/C = new /mob/living/simple_animal/construct/builder (get_turf(src.loc)) M.mind.transfer_to(C) - qdel(M) - M = null + QDEL_NULL(M) to_chat(C, "You are now an Artificer. You are incredibly weak and fragile, but you are able to construct new floors and walls, to break some walls apart, to repair allied constructs (by clicking on them), and most important of all create new constructs (Use your Artificer spell to summon a new construct shell and Summon Soulstone to create a new soulstone).") //ticker.mode.update_cult_icons_added(C.mind) if("Harvester") var/mob/living/simple_animal/construct/harvester/C = new /mob/living/simple_animal/construct/harvester (get_turf(src.loc)) M.mind.transfer_to(C) - qdel(M) - M = null + QDEL_NULL(M) to_chat(C, "You are now an Harvester. You are as fast and powerful as Wraiths, but twice as durable.
No living (or dead) creature can hide from your eyes, and no door or wall shall place itself between you and your victims.
Your role consists of neutralizing any non-cultist living being in the area and transport them to Nar-Sie. To do so, place yourself above an incapacited target and use your \"Harvest\" spell.") //ticker.mode.update_cult_icons_added(C.mind) else @@ -1441,22 +1436,19 @@ if("Juggernaut") var/mob/living/simple_animal/construct/armoured/C = new /mob/living/simple_animal/construct/armoured (get_turf(src.loc)) M.mind.transfer_to(C) - qdel(M) - M = null + QDEL_NULL(M) to_chat(C, "You are now a Juggernaut. Though slow, your shell can withstand extreme punishment, create temporary walls and even deflect energy weapons, and rip apart enemies and walls alike.") //ticker.mode.update_cult_icons_added(C.mind) if("Wraith") var/mob/living/simple_animal/construct/wraith/C = new /mob/living/simple_animal/construct/wraith (get_turf(src.loc)) M.mind.transfer_to(C) - qdel(M) - M = null + QDEL_NULL(M) to_chat(C, "You are a now Wraith. Though relatively fragile, you are fast, deadly, and even able to phase through walls.") ///ticker.mode.update_cult_icons_added(C.mind) if("Artificer") var/mob/living/simple_animal/construct/builder/C = new /mob/living/simple_animal/construct/builder (get_turf(src.loc)) M.mind.transfer_to(C) - qdel(M) - M = null + QDEL_NULL(M) to_chat(C, "You are now an Artificer. You are incredibly weak and fragile, but you are able to construct new floors and walls, to break some walls apart, to repair allied constructs (by clicking on them), and most important of all create new constructs (Use your Artificer spell to summon a new construct shell and Summon Soulstone to create a new soulstone).") //ticker.mode.update_cult_icons_added(C.mind) for(var/spell/S in C.spell_list) diff --git a/code/datums/gamemode/factions/syndicate/rev.dm b/code/datums/gamemode/factions/syndicate/rev.dm index c6b11f897e6..4acaad4bcb3 100644 --- a/code/datums/gamemode/factions/syndicate/rev.dm +++ b/code/datums/gamemode/factions/syndicate/rev.dm @@ -62,8 +62,7 @@ for(var/obj/effect/landmark/A in landmarks_list) if(A.name == "RevSq-Spawn") revsq_spawn += get_turf(A) - qdel(A) - A = null + QDEL_NULL(A) continue var/spawnpos = 1 diff --git a/code/datums/gamemode/factions/vox_shoal.dm b/code/datums/gamemode/factions/vox_shoal.dm index 83b2ee709d5..be2b0178fb5 100644 --- a/code/datums/gamemode/factions/vox_shoal.dm +++ b/code/datums/gamemode/factions/vox_shoal.dm @@ -137,8 +137,7 @@ var/list/potential_bonus_items = list( if (A.name == "vox_locker") var/obj/structure/closet/loot/L = new(get_turf(A)) our_bounty_lockers += L - qdel(A) - A = null + QDEL_NULL(A) continue var/spawn_count = 1 diff --git a/code/datums/gamemode/role/malf/shunt.dm b/code/datums/gamemode/role/malf/shunt.dm index 07c87e04ac8..8c716d694c2 100644 --- a/code/datums/gamemode/role/malf/shunt.dm +++ b/code/datums/gamemode/role/malf/shunt.dm @@ -59,7 +59,7 @@ if (!src||!loc) return init_angle() - + ma = new(src) ma.invisibility = 0 rider.client.images |= ma @@ -68,8 +68,7 @@ /obj/effect/malf_jaunt/Destroy() if (rider) - qdel(rider) - rider = null + QDEL_NULL(rider) ..() /obj/effect/malf_jaunt/cultify() diff --git a/code/datums/gamemode/role/time_agent.dm b/code/datums/gamemode/role/time_agent.dm index 89e61e31573..8c7b1a04579 100644 --- a/code/datums/gamemode/role/time_agent.dm +++ b/code/datums/gamemode/role/time_agent.dm @@ -150,8 +150,7 @@ /datum/role/time_agent/proc/recruiter_recruited(mob/dead/observer/player) if(antag && antag.current && !antag.current.stat) if(player) - qdel(eviltwinrecruiter) - eviltwinrecruiter = null + QDEL_NULL(eviltwinrecruiter) var/mob/living/carbon/human/H = new /mob/living/carbon/human(pick(timeagentstart)) H.ckey = player.ckey H.client.changeView() @@ -442,20 +441,17 @@ for (var/list/L in list(data_core.general, data_core.medical, data_core.security,data_core.locked)) if (L) var/datum/data/record/R = find_record("name", name, L) - qdel(R) - R = null + QDEL_NULL(R) for(var/obj/machinery/telecomms/server/S in telecomms_list) for(var/datum/comm_log_entry/C in S.log_entries) if(C.parameters["realname"] == name) S.log_entries.Remove(C) - qdel(C) - C = null + QDEL_NULL(C) for(var/obj/machinery/message_server/S in message_servers) for(var/datum/data_pda_msg/P in S.pda_msgs) if((P.sender == name) || (P.recipient == name)) S.pda_msgs.Remove(P) - qdel(P) - P = null + QDEL_NULL(P) M.drop_all() var/target_location = get_turf(target) message_admins("[user] ([user.ckey]) has ERASED [target] from existence at [formatJumpTo(target_location)]!") diff --git a/code/datums/helper_datums/construction_datum.dm b/code/datums/helper_datums/construction_datum.dm index 474a0d49efe..ecd6ace3b33 100644 --- a/code/datums/helper_datums/construction_datum.dm +++ b/code/datums/helper_datums/construction_datum.dm @@ -124,8 +124,7 @@ new result(get_turf(holder)) spawn() - qdel (holder) - holder = null + QDEL_NULL (holder) return /datum/construction/proc/set_desc(index as num) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index cd4fd9e323e..e6cf76940ff 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -174,8 +174,7 @@ var/global/list/ghdel_profiling = list() /atom/Destroy() if(reagents) - qdel(reagents) - reagents = null + QDEL_NULL(reagents) if(density) densityChanged() diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 8fdb3ede4d7..2b42893f79c 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -76,8 +76,7 @@ T.reconsider_lights() if(materials) - qdel(materials) - materials = null + QDEL_NULL(materials) remove_border_dummy() @@ -89,9 +88,7 @@ if (locked_to) locked_to.unlock_atom(src) - for (var/datum/locking_category/category in locking_categories) - qdel(category) - locking_categories = null + QDEL_LIST_NULL(locking_categories) locking_categories_name = null break_all_tethers() @@ -102,8 +99,7 @@ T.recalc_atom_opacity() if(virtualhearer) - qdel(virtualhearer) - virtualhearer = null + QDEL_NULL(virtualhearer) for(var/atom/movable/AM in src) qdel(AM) @@ -446,8 +442,7 @@ /atom/movable/proc/remove_border_dummy() if(border_dummy) unlock_atom(border_dummy) - qdel(border_dummy) - border_dummy = null + QDEL_NULL(border_dummy) /atom/movable/proc/border_dummy_Cross(atom/movable/mover) //border_dummy calls this in its own Cross() to detect collision if(istype(mover) && mover.checkpass(pass_flags_self)) @@ -814,8 +809,7 @@ /atom/movable/proc/removeHear() flags &= ~HEAR if(virtualhearer) - qdel(virtualhearer) - virtualhearer = null + QDEL_NULL(virtualhearer) //Can it be moved by a shuttle? /atom/movable/proc/can_shuttle_move(var/datum/shuttle/S) diff --git a/code/game/cargo_forwarding.dm b/code/game/cargo_forwarding.dm index aea510ebe63..c68cacf863b 100644 --- a/code/game/cargo_forwarding.dm +++ b/code/game/cargo_forwarding.dm @@ -263,8 +263,7 @@ initialised_type = ispath(supply_type,/datum/supply_packs) ? supply_type : pick(subtypesof(/datum/supply_packs)) ourpack = new initialised_type if(ourpack.require_holiday && (Holiday != ourpack.require_holiday)) - qdel(ourpack) - ourpack = null + QDEL_NULL(ourpack) name = ourpack.name contains = ourpack.contains.Copy() amount = ourpack.amount diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index cf3f8f83fee..276c4665e32 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -454,8 +454,7 @@ labels.Cut() buffers.Cut() if(disk) - qdel(disk) - disk = null + QDEL_NULL(disk) ..() /datum/block_label diff --git a/code/game/dna/genes/monkey.dm b/code/game/dna/genes/monkey.dm index e6dbf5c5156..bf65aef9b3d 100644 --- a/code/game/dna/genes/monkey.dm +++ b/code/game/dna/genes/monkey.dm @@ -110,8 +110,7 @@ O.update_name() // O.update_icon = 1 //queue a full icon update at next life() call Mo.monkeyizing = 0 - qdel(M) - M = null + QDEL_NULL(M) return /mob/proc/get_unmonkey_anim() diff --git a/code/game/gamemodes/blob/blobs/core.dm b/code/game/gamemodes/blob/blobs/core.dm index e5efb77fae3..2984ccf13c3 100644 --- a/code/game/gamemodes/blob/blobs/core.dm +++ b/code/game/gamemodes/blob/blobs/core.dm @@ -59,8 +59,7 @@ if(R.overmind == overmind) R.overmind = null R.update_icon() - qdel(overmind) - overmind = null + QDEL_NULL(overmind) processing_objects.Remove(src) ..() @@ -159,8 +158,7 @@ return 0 if(overmind) - qdel(overmind) - overmind = null + QDEL_NULL(overmind) var/mob/camera/blob/B = new(src.loc) B.key = new_overmind.key diff --git a/code/game/gamemodes/endgame/supermatter_cascade/blob.dm b/code/game/gamemodes/endgame/supermatter_cascade/blob.dm index 1e5ce6983f1..7f7a1a325f8 100644 --- a/code/game/gamemodes/endgame/supermatter_cascade/blob.dm +++ b/code/game/gamemodes/endgame/supermatter_cascade/blob.dm @@ -72,12 +72,10 @@ if(istype(A, /obj/machinery/singularity)) continue if(istype(A,/mob/living)) - qdel(A) - A = null + QDEL_NULL(A) else if(istype(A,/mob)) // Observers, AI cameras. continue - qdel(A) - A = null + QDEL_NULL(A) CHECK_TICK T.ChangeTurf(type) var/turf/unsimulated/wall/supermatter/SM = T diff --git a/code/game/gamemodes/endgame/xmas/snowman.dm b/code/game/gamemodes/endgame/xmas/snowman.dm index 1dd1b269b82..2e58dd301f0 100644 --- a/code/game/gamemodes/endgame/xmas/snowman.dm +++ b/code/game/gamemodes/endgame/xmas/snowman.dm @@ -10,10 +10,8 @@ health = 40 /obj/structure/snowman/Destroy() - qdel(hat) - hat = null - qdel(carrot) - carrot = null + QDEL_NULL(hat) + QDEL_NULL(carrot) ..() /obj/structure/snowman/attackby(obj/item/weapon/W, mob/user) diff --git a/code/game/gamemodes/events/black_hole.dm b/code/game/gamemodes/events/black_hole.dm index b16542d57e0..f75eaefe6ac 100644 --- a/code/game/gamemodes/events/black_hole.dm +++ b/code/game/gamemodes/events/black_hole.dm @@ -20,11 +20,9 @@ //DESTROYING STUFF AT THE EPICENTER for(var/mob/living/M in orange(1,src)) - qdel(M) - M = null + QDEL_NULL(M) for(var/obj/O in orange(1,src)) - qdel(O) - O = null + QDEL_NULL(O) for(var/turf/simulated/ST in orange(1,src)) ST.ChangeTurf(get_base_turf(ST.z)) diff --git a/code/game/gamemodes/events/holidays/Christmas.dm b/code/game/gamemodes/events/holidays/Christmas.dm index 5b356276c2d..5cbc56a0bb5 100644 --- a/code/game/gamemodes/events/holidays/Christmas.dm +++ b/code/game/gamemodes/events/holidays/Christmas.dm @@ -15,8 +15,7 @@ evil_tree.icon_living = evil_tree.icon_state evil_tree.icon_dead = evil_tree.icon_state evil_tree.icon_gib = evil_tree.icon_state - qdel(xmas) - xmas = null + QDEL_NULL(xmas) /obj/item/weapon/toy/xmas_cracker name = "xmas cracker" @@ -50,4 +49,4 @@ target.put_in_active_hand(other_half) playsound(user, 'sound/effects/snap.ogg', 50, 1) return 1 - return ..() \ No newline at end of file + return ..() diff --git a/code/game/gamemodes/wizard/apprentice_contract.dm b/code/game/gamemodes/wizard/apprentice_contract.dm index 745ff068299..143ab1904ec 100644 --- a/code/game/gamemodes/wizard/apprentice_contract.dm +++ b/code/game/gamemodes/wizard/apprentice_contract.dm @@ -75,8 +75,7 @@ var/list/wizard_apprentice_setups_by_name = list() /obj/item/wizard_apprentice_contract/Destroy() owner = null - qdel(recruiter) - recruiter = null + QDEL_NULL(recruiter) ..() /obj/item/wizard_apprentice_contract/attack_self(mob/user) diff --git a/code/game/machinery/ATM.dm b/code/game/machinery/ATM.dm index ad4f51d5171..5c07d7850a6 100644 --- a/code/game/machinery/ATM.dm +++ b/code/game/machinery/ATM.dm @@ -45,8 +45,7 @@ log transactions /obj/machinery/atm/Destroy() if(atm_card) - qdel(atm_card) - atm_card = null + QDEL_NULL(atm_card) ..() /obj/machinery/atm/process() diff --git a/code/game/machinery/Freezer.dm b/code/game/machinery/Freezer.dm index b33c062c9a6..ea7ec71f250 100644 --- a/code/game/machinery/Freezer.dm +++ b/code/game/machinery/Freezer.dm @@ -85,8 +85,7 @@ node1.disconnect(src) node1 = null if(network) - qdel(network) - network = null + QDEL_NULL(network) update_icon() @@ -257,8 +256,7 @@ node1.disconnect(src) node1 = null if(network) - qdel(network) - network = null + QDEL_NULL(network) /obj/machinery/atmospherics/unary/heat_reservoir/heater/attack_hand(mob/user as mob) diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index 563b81f0682..b1206fb3c93 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -699,18 +699,15 @@ occupant.paralysis = 0 go_out() if("Rare") - qdel(occupant) - occupant = null + QDEL_NULL(occupant) for(var/i = 1;i < 5;i++) new /obj/item/weapon/reagent_containers/food/snacks/soylentgreen(loc) if("Medium") - qdel(occupant) - occupant = null + QDEL_NULL(occupant) for(var/i = 1;i < 5;i++) new /obj/item/weapon/reagent_containers/food/snacks/badrecipe(loc) if("Well Done") - qdel(occupant) - occupant = null + QDEL_NULL(occupant) var/obj/effect/decal/cleanable/ash/ashed = new /obj/effect/decal/cleanable/ash(loc) ashed.layer = layer + 0.01 playsound(src, 'sound/machines/ding.ogg', 50, 1) diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index 3a50d02bc3a..5ac52264e3f 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -35,8 +35,7 @@ /obj/machinery/bodyscanner/Destroy() go_out() //Eject everything if (immune) - qdel(immune) - immune = null + QDEL_NULL(immune) ..() /obj/machinery/bodyscanner/update_icon() diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index 14aff1cc814..e73d5c7b34d 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -302,8 +302,7 @@ var/global/list/air_alarms = list() /obj/machinery/alarm/Destroy() if(wires) - qdel(wires) - wires = null + QDEL_NULL(wires) for(var/obj/machinery/computer/atmoscontrol/AC in atmos_controllers) if(AC.current == src) AC.current = null diff --git a/code/game/machinery/atmoalter/gas_mine.dm b/code/game/machinery/atmoalter/gas_mine.dm index 984dd5f0bd3..d91a6caa5ab 100644 --- a/code/game/machinery/atmoalter/gas_mine.dm +++ b/code/game/machinery/atmoalter/gas_mine.dm @@ -7,7 +7,7 @@ icon = 'icons/obj/atmospherics/miner.dmi' icon_state = "miner" power_channel=ENVIRON - var/base_power_usage = 100 //their base powerdraw, can be increased + var/base_power_usage = 100 //their base powerdraw, can be increased idle_power_usage = 10 //draw when off, stays constant starting_materials = null @@ -16,14 +16,14 @@ var/moles_outputted //moles outputted last tick. used when examining var/base_gas_production = 4500 //base KPa per tick - without external power var/max_external_pressure = 10000 //base KPa output - without external power - var/output_temperature = T20C + var/output_temperature = T20C var/on = TRUE - + /* var/datum/power_connection/consumer/power_connection*/ // var/power_load = 5000 //draw external power from a wire node var/power_load_last_tick = 0 //prevent cheeky way to make loadsa gas var/power_load_two_ticks_ago = 0 - + var/list/gases = list() //which gases the miner generates var/datum/gas_mixture/air_contents //which gases the miner generates, and how fast (in KPa per tick) var/datum/gas_mixture/pumping //used in transfering air around @@ -33,31 +33,28 @@ machine_flags = WRENCHMOVE | FIXED2WORK /obj/machinery/atmospherics/miner/New() - ..() + ..() pumping = new air_contents = new /* power_connection = new(src) - + power_connection.monitoring_enabled = TRUE power_connection.power_priority = POWER_PRIORITY_EXCESS power_connection.use_power = MACHINE_POWER_USE_ACTIVE power_connection.active_usage = power_load*/ air_contents.volume = 1000 pumping.volume = 1000 //Same as above so copying works correctly - + power_change() update_icon() /obj/machinery/atmospherics/miner/Destroy() if(pumping) - qdel(pumping) - pumping = null + QDEL_NULL(pumping) if(air_contents) - qdel(air_contents) - air_contents = null + QDEL_NULL(air_contents) /* if(power_connection) - qdel(power_connection) - power_connection = null*/ + QDEL_NULL(power_connection)*/ ..() /obj/machinery/atmospherics/miner/verb/set_power_consumption() @@ -83,7 +80,7 @@ for(var/current_gas in gases) air_contents.adjust_gas(current_gas, gases[current_gas] * rate) - + air_contents.temperature = output_temperature air_contents.update_values() @@ -99,14 +96,14 @@ /* if(power_connection.connected) //raise max pressure if powered var/power_actually_consumed = power_connection.get_satisfaction() * power_load_last_tick extra_power_pressure_bonus = power_actually_consumed * WATT_TO_KPA_OF_EXTERNAL_PRESSURE_LIMIT*/ - + var/pressure_delta = max(0, (max_external_pressure + extra_power_pressure_bonus - environment_pressure)) if(pressure_delta > 0.1) moles_outputted = pressure_delta * CELL_VOLUME / (output_temperature * R_IDEAL_GAS_EQUATION) moles_outputted = min(moles_outputted, pumping.total_moles) var/datum/gas_mixture/removed = pumping.remove(moles_outputted) loc.assume_air(removed) - else + else moles_outputted = 0 /*/obj/machinery/atmospherics/miner/proc/draw_power() @@ -134,7 +131,7 @@ if(!connected_cable) return 0 return power_connection.connect(connected_cable)*/ - + /obj/machinery/atmospherics/miner/examine(mob/user) . = ..() @@ -275,7 +272,7 @@ overlay_color = "#70DBDB" gases = list(GAS_OXYGEN = 0.2, GAS_NITROGEN = 0.8) on = 0 - + /obj/machinery/atmospherics/miner/mixed_nitrogen name = "\improper Mixed Gas Miner" desc = "Pumping nitrogen, carbon dioxide, and plasma." diff --git a/code/game/machinery/atmoalter/portable_atmospherics.dm b/code/game/machinery/atmoalter/portable_atmospherics.dm index 5dd6eb0dea1..1fb77d17963 100644 --- a/code/game/machinery/atmoalter/portable_atmospherics.dm +++ b/code/game/machinery/atmoalter/portable_atmospherics.dm @@ -35,8 +35,7 @@ /obj/machinery/portable_atmospherics/Destroy() disconnect() - qdel(air_contents) - air_contents = null + QDEL_NULL(air_contents) ..() /obj/machinery/portable_atmospherics/update_icon() diff --git a/code/game/machinery/atmoalter/vaporizer.dm b/code/game/machinery/atmoalter/vaporizer.dm index 870735e077b..4cca7f1656f 100644 --- a/code/game/machinery/atmoalter/vaporizer.dm +++ b/code/game/machinery/atmoalter/vaporizer.dm @@ -31,8 +31,7 @@ /obj/machinery/vaporizer/Destroy() ..() - qdel(mixing_chamber) - mixing_chamber = null + QDEL_NULL(mixing_chamber) /obj/machinery/vaporizer/proc/toggle_power() on = !on diff --git a/code/game/machinery/bots/bots.dm b/code/game/machinery/bots/bots.dm index d758fb1f3eb..e1ee5737705 100644 --- a/code/game/machinery/bots/bots.dm +++ b/code/game/machinery/bots/bots.dm @@ -98,8 +98,7 @@ /obj/machinery/bot/Destroy() . = ..() if(botcard) - qdel(botcard) - botcard = null + QDEL_NULL(botcard) if (waiting_for_patrol || waiting_for_path) for (var/datum/path_maker/PM in pathmakers) if (PM.owner == src) diff --git a/code/game/machinery/bots/farmbot.dm b/code/game/machinery/bots/farmbot.dm index d8bd8f07202..0c6d801104e 100644 --- a/code/game/machinery/bots/farmbot.dm +++ b/code/game/machinery/bots/farmbot.dm @@ -356,8 +356,7 @@ var/obj/machinery/portable_atmospherics/hydroponics/tray = target tray.add_nutrientlevel(10) fert.reagents.trans_to(tray, fert.reagents.total_volume) - qdel (fert) - fert = null + QDEL_NULL (fert) //tray.updateicon() icon_state = "[src.icon_initial]_fertile" mode = FARMBOT_MODE_WAITING @@ -484,8 +483,7 @@ to_chat(user, "You add the robot arm to the [src]") src.forceMove(A) //Place the water tank into the assembly, it will be needed for the finished bot - qdel(S) - S = null + QDEL_NULL(S) /obj/item/weapon/farmbot_arm_assembly/attackby(obj/item/weapon/W as obj, mob/user as mob) ..() @@ -493,22 +491,19 @@ src.build_step++ to_chat(user, "You add the plant analyzer to [src]!") src.name = "farmbot assembly" - qdel(W) - W = null + QDEL_NULL(W) else if(( istype(W, /obj/item/weapon/reagent_containers/glass/bucket)) && (src.build_step == 1)) src.build_step++ to_chat(user, "You add a bucket to [src]!") src.name = "farmbot assembly with bucket" - qdel(W) - W = null + QDEL_NULL(W) else if(( istype(W, /obj/item/weapon/minihoe)) && (src.build_step == 2)) src.build_step++ to_chat(user, "You add a minihoe to [src]!") src.name = "farmbot assembly with bucket and minihoe" - qdel(W) - W = null + QDEL_NULL(W) else if((isprox(W)) && (src.build_step == 3)) src.build_step++ @@ -519,8 +514,7 @@ S.tank = wTank S.forceMove(get_turf(src)) S.name = src.created_name - qdel(W) - W = null + QDEL_NULL(W) qdel(src) else if(istype(W, /obj/item/weapon/pen)) diff --git a/code/game/machinery/bots/floorbot.dm b/code/game/machinery/bots/floorbot.dm index 4aab3eb7933..9db1f85e644 100644 --- a/code/game/machinery/bots/floorbot.dm +++ b/code/game/machinery/bots/floorbot.dm @@ -459,8 +459,7 @@ var/global/list/floorbot_targets=list() if(!istype(T, /obj/item/stack/tile/metal) || contents.len >= 1 || floorbot_type() == "no_build") //Only do this if the thing is empty return ..() user.remove_from_mob(T) - qdel(T) - T = null + QDEL_NULL(T) var/obj/item/weapon/toolbox_tiles/B = new /obj/item/weapon/toolbox_tiles B.skin = floorbot_type() B.icon_state = "[B.skin]toolbox_tiles" @@ -472,8 +471,7 @@ var/global/list/floorbot_targets=list() /obj/item/weapon/toolbox_tiles/attackby(var/obj/item/W, mob/user as mob) ..() if(isprox(W)) - qdel(W) - W = null + QDEL_NULL(W) var/obj/item/weapon/toolbox_tiles_sensor/B = new /obj/item/weapon/toolbox_tiles_sensor() B.created_name = created_name B.skin = skin diff --git a/code/game/machinery/bots/medbot.dm b/code/game/machinery/bots/medbot.dm index 0efff7ba929..37b93f4bcca 100644 --- a/code/game/machinery/bots/medbot.dm +++ b/code/game/machinery/bots/medbot.dm @@ -571,8 +571,7 @@ var/list/firstaid_exceptions = list( var/obj/item/weapon/firstaid_arm_assembly/A = new /obj/item/weapon/firstaid_arm_assembly(get_turf(src),icon_state) - qdel(S) - S = null + QDEL_NULL(S) user.put_in_hands(A) to_chat(user, "You add the robot arm to the first aid kit.") user.drop_from_inventory(src) diff --git a/code/game/machinery/bots/mulebot.dm b/code/game/machinery/bots/mulebot.dm index 21c3607fd66..86f9644becb 100644 --- a/code/game/machinery/bots/mulebot.dm +++ b/code/game/machinery/bots/mulebot.dm @@ -118,11 +118,9 @@ var/global/mulebot_count = 0 radio_controller.remove_object(src, control_freq) radio_controller.remove_object(src, beacon_freq) if(wires) - qdel(wires) - wires = null + QDEL_NULL(wires) if(cell) - qdel(cell) - cell = null + QDEL_NULL(cell) ..() @@ -959,8 +957,7 @@ var/global/mulebot_count = 0 /obj/item/mulebot_laser/Destroy() . = ..() laser_pointers_list -= src - qdel(radio) - radio = null + QDEL_NULL(radio) my_mulebot = null /obj/item/mulebot_laser/attack_self(mob/user) diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 0d878fe37ae..254f3d0d1fb 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -138,8 +138,7 @@ var/list/camera_names=list() /obj/machinery/camera/Destroy() deactivate(null, 0) //kick anyone viewing out if(assembly) - qdel(assembly) - assembly = null + QDEL_NULL(assembly) wires = null cameranet.cameras -= src cameranet.removeCamera(src) //Will handle removal from the camera network and the chunks, so we don't need to worry about that diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm index d8b2c959822..cdbdbeb1648 100644 --- a/code/game/machinery/cell_charger.dm +++ b/code/game/machinery/cell_charger.dm @@ -198,8 +198,7 @@ new result(get_turf(holder)) - qdel (holder) - holder = null + QDEL_NULL (holder) feedback_inc("crank_charger_created",1) @@ -271,8 +270,7 @@ /obj/item/device/crank_charger/Destroy() if(stored) - qdel(stored) - stored = null + QDEL_NULL(stored) ..() /obj/item/device/crank_charger/generous diff --git a/code/game/machinery/computer/ai_core.dm b/code/game/machinery/computer/ai_core.dm index 5d90831470e..fd5cea9549b 100644 --- a/code/game/machinery/computer/ai_core.dm +++ b/code/game/machinery/computer/ai_core.dm @@ -210,8 +210,7 @@ That prevents a few funky behaviors. A.cancel_camera() to_chat(A, "You have been uploaded to a stationary terminal. Remote device connection restored.") to_chat(U, "Transfer successful: [A.name] ([rand(1000,9999)].exe) installed and executed successfully. Local copy has been removed.") - qdel(T) - T = null + QDEL_NULL(T) if("AIFIXER")//AI Fixer terminal. var/obj/machinery/computer/aifixer/T = target switch(interaction) diff --git a/code/game/machinery/computer/arcade/arcade.dm b/code/game/machinery/computer/arcade/arcade.dm index 65c376121c5..da066490527 100644 --- a/code/game/machinery/computer/arcade/arcade.dm +++ b/code/game/machinery/computer/arcade/arcade.dm @@ -32,8 +32,7 @@ /obj/machinery/computer/arcade/Destroy() if(game) - qdel(game) - game = null + QDEL_NULL(game) ..() /obj/machinery/computer/arcade/proc/import_game_data(var/obj/item/weapon/circuitboard/arcade/A) diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm index d65f1161f5b..c68f2a7f680 100644 --- a/code/game/machinery/computer/buildandrepair.dm +++ b/code/game/machinery/computer/buildandrepair.dm @@ -14,8 +14,7 @@ /obj/structure/computerframe/Destroy() ..() - qdel(circuit) - circuit = null + QDEL_NULL(circuit) /obj/item/weapon/circuitboard density = 0 diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index 017188a1cfb..d98e3b9f529 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -262,8 +262,7 @@ if (href_list["del_all2"]) for(var/datum/data/record/R in data_core.medical) - qdel(R) - R = null + QDEL_NULL(R) //Foreach goto(494) temp = "All records deleted." @@ -460,8 +459,7 @@ if (href_list["del_r2"]) if (active2) - qdel(active2) - active2 = null + QDEL_NULL(active2) if (href_list["d_rec"]) var/datum/data/record/R = locate(href_list["d_rec"]) @@ -587,8 +585,7 @@ continue else if(prob(1)) - qdel(R) - R = null + QDEL_NULL(R) continue ..(severity) diff --git a/code/game/machinery/computer/prisonshuttle.dm b/code/game/machinery/computer/prisonshuttle.dm index f2bfd1b77e5..6bfe691d9e2 100644 --- a/code/game/machinery/computer/prisonshuttle.dm +++ b/code/game/machinery/computer/prisonshuttle.dm @@ -176,8 +176,7 @@ var/prison_shuttle_timeleft = 0 for(var/atom/movable/AM as mob|obj in T) AM.Move(D) if(istype(T, /turf/simulated)) - qdel(T) - T = null + QDEL_NULL(T) start_location.move_contents_to(end_location) else diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index feaad5cc53b..301d4dc2c4b 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -373,8 +373,7 @@ What a mess.*/ No"} if ("Purge All Records") for(var/datum/data/record/R in data_core.security) - qdel(R) - R = null + QDEL_NULL(R) temp = "All Security records deleted." if ("Add Entry") @@ -534,21 +533,17 @@ What a mess.*/ if ("Delete Record (Security) Execute") if (active2) - qdel(active2) - active2 = null + QDEL_NULL(active2) if ("Delete Record (ALL) Execute") if (active1) for(var/datum/data/record/R in data_core.medical) if ((R.fields["name"] == active1.fields["name"] || R.fields["id"] == active1.fields["id"])) - qdel(R) - R = null + QDEL_NULL(R) else - qdel(active1) - active1 = null + QDEL_NULL(active1) if (active2) - qdel(active2) - active2 = null + QDEL_NULL(active2) else temp = "This function does not appear to be working at the moment. Our apologies." @@ -579,8 +574,7 @@ What a mess.*/ continue else if(prob(1)) - qdel(R) - R = null + QDEL_NULL(R) continue ..(severity) diff --git a/code/game/machinery/computer/shuttle_computers.dm b/code/game/machinery/computer/shuttle_computers.dm index 281553d7ca8..0c623859ec3 100644 --- a/code/game/machinery/computer/shuttle_computers.dm +++ b/code/game/machinery/computer/shuttle_computers.dm @@ -165,8 +165,7 @@ /obj/machinery/computer/shuttle_control/Destroy() if(disk) - qdel(disk) - disk = null + QDEL_NULL(disk) ..() @@ -425,8 +424,7 @@ if(istype(disk.destination, /obj/docking_port/destination/coord)) if(shuttle.current_port == disk.destination) shuttle.current_port = null - qdel(disk.destination) - disk.destination = null + QDEL_NULL(disk.destination) disk.destination = new /obj/docking_port/destination/coord(dest) disk.destination.dir = angle2dir( dir2angle(shuttle.linked_port.dir) + custom_rot + 180) //For instance, COURSE:06:06:2600:12:00 diff --git a/code/game/machinery/computer/specops_shuttle.dm b/code/game/machinery/computer/specops_shuttle.dm index c959212eda8..e2ac0f3c8bb 100644 --- a/code/game/machinery/computer/specops_shuttle.dm +++ b/code/game/machinery/computer/specops_shuttle.dm @@ -76,8 +76,7 @@ var/specops_shuttle_timeleft = 0 for(var/atom/movable/AM as mob|obj in T) AM.Move(D) if(istype(T, /turf/simulated)) - qdel(T) - T = null + QDEL_NULL(T) start_location.move_contents_to(end_location) @@ -90,8 +89,7 @@ var/specops_shuttle_timeleft = 0 for(var/obj/machinery/computer/specops_shuttle/S in machines) S.specops_shuttle_timereset = world.time + SPECOPS_RETURN_DELAY - qdel(announcer) - announcer = null + QDEL_NULL(announcer) /proc/AliceAnnounce(var/atom/movable/announcer,var/message) var/datum/speech/speech = announcer.create_speech(message=message, frequency=radiochannels["Response Team"], transmitter=announcer) //speech.name="A.L.I.C.E." @@ -229,8 +227,7 @@ var/specops_shuttle_timeleft = 0 for(var/atom/movable/AM as mob|obj in T) AM.Move(D) if(istype(T, /turf/simulated)) - qdel(T) - T = null + QDEL_NULL(T) start_location.move_contents_to(end_location) diff --git a/code/game/machinery/computer/syndicate_specops_shuttle.dm b/code/game/machinery/computer/syndicate_specops_shuttle.dm index 944c2927d6d..f3a3d8385f2 100644 --- a/code/game/machinery/computer/syndicate_specops_shuttle.dm +++ b/code/game/machinery/computer/syndicate_specops_shuttle.dm @@ -165,8 +165,7 @@ var/syndicate_elite_shuttle_timeleft = 0 for(var/atom/movable/AM as mob|obj in T) AM.Move(D) if(istype(T, /turf/simulated)) - qdel(T) - T = null + QDEL_NULL(T) start_location.move_contents_to(end_location) diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index 4a0a256f322..a48a1b08721 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -352,8 +352,7 @@ var/global/list/cryo_health_indicator = list( "full" = image("icon" = 'icons/obj return var/mob/M = G:affecting if(put_mob(M, user)) - qdel(G) - G = null + QDEL_NULL(G) updateUsrDialog() return diff --git a/code/game/machinery/disk_duplicator.dm b/code/game/machinery/disk_duplicator.dm index f06707d9f94..558a8bcbd7e 100644 --- a/code/game/machinery/disk_duplicator.dm +++ b/code/game/machinery/disk_duplicator.dm @@ -322,8 +322,7 @@ var/list/inserted_datadisk_cache = list() if (emagged) qdel(disk_source) - qdel(disk_dest) - disk_dest = null + QDEL_NULL(disk_dest) disk_source = new /obj/item/weapon/disk(src) new /obj/item/weapon/disk(loc) playsound(loc, 'sound/machines/click.ogg', 50, 1) @@ -331,8 +330,7 @@ var/list/inserted_datadisk_cache = list() return - qdel(disk_dest) - disk_dest = null + QDEL_NULL(disk_dest) playsound(loc, 'sound/machines/click.ogg', 50, 1) var/obj/item/weapon/disk/C = new disk_source.type(loc) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 3419561a02c..f3bb13f6092 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -68,8 +68,7 @@ /obj/machinery/door/airlock/Destroy() if(wires) - qdel(wires) - wires = null + QDEL_NULL(wires) ..() @@ -300,8 +299,7 @@ for(var/obj/structure/falsewall/plasma/F in range(3,src))//Hackish as fuck, but until fire_act works, there is nothing I can do -Sieve var/turf/T = get_turf(F) T.ChangeTurf(/turf/simulated/wall/mineral/plasma/) - qdel (F) - F = null + QDEL_NULL (F) for(var/turf/simulated/wall/mineral/plasma/W in range(3,src)) W.ignite((temperature/4))//Added so that you can't set off a massive chain reaction with a small flame for(var/obj/machinery/door/airlock/plasma/D in range(3,src)) diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index df0af2832ef..f516df58c32 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -247,8 +247,7 @@ to_chat(user, "You removed \the [electronics.name]!") make_assembly() if(smartwindow) - qdel(smartwindow) - smartwindow = null + QDEL_NULL(smartwindow) if(window_is_opaque) window_is_opaque = !window_is_opaque smart_toggle() diff --git a/code/game/machinery/embedded_controller/embedded_controller_base.dm b/code/game/machinery/embedded_controller/embedded_controller_base.dm index 7c5af346370..ba29850ddaa 100644 --- a/code/game/machinery/embedded_controller/embedded_controller_base.dm +++ b/code/game/machinery/embedded_controller/embedded_controller_base.dm @@ -206,8 +206,7 @@ if(radio_connection) return radio_connection.post_signal(src, signal) else - qdel(signal) - signal = null + QDEL_NULL(signal) /obj/machinery/embedded_controller/radio/proc/set_frequency(new_frequency) radio_controller.remove_object(src, frequency) diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index f8300a514c1..5649ae25a6a 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -135,7 +135,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/ if(ol.loc == src) ol.icon_state = "holopad1" break - + return 1 /obj/machinery/hologram/holopad/proc/create_advanced_holo(var/mob/living/silicon/ai/A) @@ -172,14 +172,14 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/ continue newlist["[M.name]"] = M return newlist - + /obj/machinery/hologram/holopad/proc/clear_holo() if(master && master.holopadoverlays.len) for(var/image/ol in master.holopadoverlays) if(ol.loc == src) ol.icon_state = "holopad0" break - + set_light(0) //pad lighting (hologram lighting will be handled automatically since its owner was deleted) icon_state = "holopad0" use_power = MACHINE_POWER_USE_IDLE//Passive power usage. @@ -188,8 +188,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/ if(master.current == src) master.current = null master = null //Null the master, since no-one is using it now. - qdel(ray) - ray = null + QDEL_NULL(ray) if(holo) var/obj/effect/overlay/hologram/H = holo visible_message("The image of [holo] fades away.") @@ -347,7 +346,7 @@ Holographic project of everything else. density = 1 anchored = 0 var/mob/camera/aiEye/eye - var/obj/machinery/hologram/holopad/parent + var/obj/machinery/hologram/holopad/parent /obj/effect/overlay/hologram/lifelike/New(var/loc, var/mob/living/mob_to_copy, var/mob/eyeobj, var/obj/machinery/hologram/holopad/H) ..() @@ -358,12 +357,12 @@ Holographic project of everything else. set_light(0) /obj/effect/overlay/hologram/lifelike/proc/steal_appearance(var/mob/living/M) - name = M.name + name = M.name appearance = M.appearance if(M.lying) // make them stand up if they were lying down pixel_y += 6 * PIXEL_MULTIPLIER transform = transform.Turn(-90) - var/datum/log/L = new + var/datum/log/L = new M.examine(L) desc = L.log qdel(L) @@ -371,7 +370,7 @@ Holographic project of everything else. /obj/effect/overlay/hologram/lifelike/examine(mob/user, var/size = "") if(desc) to_chat(user, desc) - + /obj/effect/overlay/hologram/lifelike/attack_hand(var/mob/living/M) M.visible_message(\ diff --git a/code/game/machinery/holosign.dm b/code/game/machinery/holosign.dm index 0f04565d0cd..a6870b478a4 100644 --- a/code/game/machinery/holosign.dm +++ b/code/game/machinery/holosign.dm @@ -24,8 +24,7 @@ var/list/obj/machinery/holosign/holosigns = list() /obj/machinery/holosign/Destroy() if (overlay) - qdel(overlay) - overlay = null + QDEL_NULL(overlay) ..() /obj/machinery/holosign/proc/toggle(var/active) @@ -110,8 +109,7 @@ var/list/obj/machinery/holosign/holosigns = list() /obj/machinery/holosign_switch/Destroy() if (overlay) - qdel(overlay) - overlay = null + QDEL_NULL(overlay) ..() /obj/machinery/holosign_switch/attack_paw(mob/user as mob) diff --git a/code/game/machinery/kitchen/gibber.dm b/code/game/machinery/kitchen/gibber.dm index fe0a8782d42..c50e825d817 100644 --- a/code/game/machinery/kitchen/gibber.dm +++ b/code/game/machinery/kitchen/gibber.dm @@ -267,8 +267,7 @@ src.occupant.death(1) src.occupant.ghostize(0) - qdel(src.occupant) - src.occupant = null + QDEL_NULL(src.occupant) spawn(src.gibtime)//finally we throw both the meat and gibs in front of the gibber. playsound(src, 'sound/effects/gib2.ogg', 50, 1) diff --git a/code/game/machinery/kitchen/microwave.dm b/code/game/machinery/kitchen/microwave.dm index c586bd1dfea..a6656be41f0 100644 --- a/code/game/machinery/kitchen/microwave.dm +++ b/code/game/machinery/kitchen/microwave.dm @@ -537,8 +537,7 @@ var/id = O.reagents.get_master_reagent_id() if (id) amount+=O.reagents.get_reagent_amount(id) - qdel(O) - O = null + QDEL_NULL(O) src.reagents.clear_reagents() ffuu.reagents.add_reagent(CARBON, amount) ffuu.reagents.add_reagent(TOXIN, amount/10) diff --git a/code/game/machinery/kitchen/monkeyrecycler.dm b/code/game/machinery/kitchen/monkeyrecycler.dm index e02cbd98b06..ea44e27081b 100644 --- a/code/game/machinery/kitchen/monkeyrecycler.dm +++ b/code/game/machinery/kitchen/monkeyrecycler.dm @@ -85,8 +85,7 @@ else user.drop_item(G, force_drop = 1) var/ourtype = target.type - qdel(target) - target = null + QDEL_NULL(target) to_chat(user, "You stuff \the [target] in the machine.") playsound(src, 'sound/machines/juicer.ogg', 50, 1) use_power(500) @@ -107,8 +106,7 @@ return else var/ourtype = target.type - qdel(target) - target = null + QDEL_NULL(target) to_chat(user, "You stuff \the [target] in the machine.") playsound(src, 'sound/machines/juicer.ogg', 50, 1) use_power(500) diff --git a/code/game/machinery/kitchen/processor.dm b/code/game/machinery/kitchen/processor.dm index 4cef019cb4f..f84f1cc0bff 100644 --- a/code/game/machinery/kitchen/processor.dm +++ b/code/game/machinery/kitchen/processor.dm @@ -52,8 +52,7 @@ if (src.output && loc) new src.output(loc) if (what) - qdel(what) - what = null + QDEL_NULL(what) /* objs */ /datum/food_processor_process/poison/process(loc, atom/movable/what) @@ -180,8 +179,7 @@ I.forceMove(loc) I.throw_at(pick(throwzone),rand(2,5),0) hgibs(loc, target.virus2, target.dna, target.species.flesh_color, target.species.blood_color) - qdel(target) - target = null + QDEL_NULL(target) for(var/i = 1;i<=6;i++) new /obj/item/weapon/reagent_containers/food/snacks/chicken_nuggets(loc) sleep(2) diff --git a/code/game/machinery/magnet.dm b/code/game/machinery/magnet.dm index c83aee13fe0..4fa9187930b 100644 --- a/code/game/machinery/magnet.dm +++ b/code/game/machinery/magnet.dm @@ -162,7 +162,7 @@ active_power_usage = electricity_level*15 else use_power = MACHINE_POWER_USE_NONE - + updateicon() /obj/machinery/magnetic_module/proc/magnetic_process() // proc that actually does the pulling @@ -359,8 +359,7 @@ // N, S, E, W are directional // C is center // R is random (in magnetic field's bounds) - qdel(signal) - signal = null + QDEL_NULL(signal) break // break the loop if the character located is invalid signal.data["command"] = nextmove diff --git a/code/game/machinery/overview.dm b/code/game/machinery/overview.dm index ef9f4b44d89..693a460fd10 100644 --- a/code/game/machinery/overview.dm +++ b/code/game/machinery/overview.dm @@ -181,10 +181,8 @@ HI.Insert(I, frame=1, delay = 5) HI.Insert(J, frame=2, delay = 5) - qdel(I) - I = null - qdel(J) - J = null + QDEL_NULL(I) + QDEL_NULL(J) H.icon = HI H.layer = 25 usr.mapobjs += H @@ -309,8 +307,7 @@ var/icon/I = imap[i+1] H.icon = I - qdel(I) - I = null + QDEL_NULL(I) H.layer = 25 usr.mapobjs += H diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index 7eea2a295f8..859903a6b04 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -277,15 +277,13 @@ Status: []
"}, if((src.lasercolor == "b") && (enabled)) if(istype(Proj, /obj/item/projectile/beam/lasertag/red)) enabled = 0 - qdel (Proj) - Proj = null + QDEL_NULL (Proj) sleep(100) enabled = 1 if((src.lasercolor == "r") && (enabled)) if(istype(Proj, /obj/item/projectile/beam/lasertag/blue)) enabled = 0 - qdel (Proj) - Proj = null + QDEL_NULL (Proj) sleep(100) enabled = 1 return diff --git a/code/game/machinery/scp_294.dm b/code/game/machinery/scp_294.dm index 36df30a4691..ffca63855cb 100644 --- a/code/game/machinery/scp_294.dm +++ b/code/game/machinery/scp_294.dm @@ -91,8 +91,7 @@ if(!X.gcDestroyed) X.create_reagents(X.volume) else - qdel(X) - X = null + QDEL_NULL(X) return var/space = U.maximum_volume - U.total_volume diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm index abe8835add9..8aad8f4bda8 100644 --- a/code/game/machinery/shieldgen.dm +++ b/code/game/machinery/shieldgen.dm @@ -336,8 +336,7 @@ cleanup(EAST) cleanup(WEST) if(power_connection) - qdel(power_connection) - power_connection = null + QDEL_NULL(power_connection) ..() /obj/machinery/shieldwallgen/free_access diff --git a/code/game/machinery/singularity_beacon.dm b/code/game/machinery/singularity_beacon.dm index 1a7529f6278..139ecf9067a 100644 --- a/code/game/machinery/singularity_beacon.dm +++ b/code/game/machinery/singularity_beacon.dm @@ -30,8 +30,7 @@ /obj/machinery/singularity_beacon/Destroy() if(power_connection) - qdel(power_connection) - power_connection = null + QDEL_NULL(power_connection) . = ..() /obj/machinery/singularity_beacon/get_cell() @@ -117,8 +116,7 @@ if(active) deactivate() if(cell) - qdel(cell) - cell = null + QDEL_NULL(cell) ..() /* diff --git a/code/game/machinery/suit_modifier.dm b/code/game/machinery/suit_modifier.dm index 86db601ccd6..8286202920f 100644 --- a/code/game/machinery/suit_modifier.dm +++ b/code/game/machinery/suit_modifier.dm @@ -100,8 +100,7 @@ /obj/machinery/suit_modifier/Destroy() ..() vis_contents.Cut() - qdel(suit_overlay) - suit_overlay = null + QDEL_NULL(suit_overlay) /obj/machinery/suit_modifier/examine(mob/user) ..() diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index 535e60466a6..b8ede75a5ee 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -681,8 +681,7 @@ //for(var/obj/O in src) // O.loc = loc add_fingerprint(user) - qdel(G) - G = null + QDEL_NULL(G) updateUsrDialog() update_icon() return diff --git a/code/game/machinery/telecomms/logbrowser.dm b/code/game/machinery/telecomms/logbrowser.dm index 449dec6ba25..68949d215a9 100644 --- a/code/game/machinery/telecomms/logbrowser.dm +++ b/code/game/machinery/telecomms/logbrowser.dm @@ -207,8 +207,7 @@ temp = "- DELETED ENTRY: [D.name] -" SelectedServer.log_entries.Remove(D) - qdel(D) - D = null + QDEL_NULL(D) else temp = "- FAILED: NO SELECTED MACHINE -" diff --git a/code/game/machinery/telecomms/multicaster.dm b/code/game/machinery/telecomms/multicaster.dm index a8f3ca26002..985893c70b5 100644 --- a/code/game/machinery/telecomms/multicaster.dm +++ b/code/game/machinery/telecomms/multicaster.dm @@ -31,8 +31,7 @@ var/list/pda_multicasters = list() /obj/machinery/pda_multicaster/Destroy() pda_multicasters.Remove(src) if(CAMO) - qdel(CAMO) - CAMO = null + QDEL_NULL(CAMO) ..() /obj/machinery/pda_multicaster/update_icon() diff --git a/code/game/machinery/telecomms/telemonitor.dm b/code/game/machinery/telecomms/telemonitor.dm index dec707c5136..c7a4a96479c 100644 --- a/code/game/machinery/telecomms/telemonitor.dm +++ b/code/game/machinery/telecomms/telemonitor.dm @@ -201,8 +201,7 @@ spawn(1 SECONDS) if(!trace_signal.data["done"]) tracert_report += "The operation timed out.
Last Known Machine: \ref[last_machine] [last_machine.id]" - qdel(trace_signal) - trace_signal = null + QDEL_NULL(trace_signal) updateUsrDialog() /obj/machinery/computer/telecomms/monitor/proc/receive_trace(var/obj/machinery/telecomms/T, var/routeinfo) diff --git a/code/game/machinery/turrets.dm b/code/game/machinery/turrets.dm index eca4dfdfc89..a292945880d 100644 --- a/code/game/machinery/turrets.dm +++ b/code/game/machinery/turrets.dm @@ -355,8 +355,7 @@ flick("explosion", src) src.setDensity(TRUE) if (cover!=null) // deletes the cover - no need on keeping it there! - qdel(cover) - cover = null + QDEL_NULL(cover) /obj/machinery/turret/proc/malf_take_control(mob/living/silicon/ai/A) @@ -733,8 +732,7 @@ /obj/machinery/turret/Destroy() // deletes its own cover with it if(cover) - qdel(cover) - cover = null + QDEL_NULL(cover) ..() /obj/machinery/turret/centcomm diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index e6329f75ba0..67887f9d13a 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -189,11 +189,9 @@ var/global/num_vending_terminals = 1 /obj/machinery/vending/Destroy() if(wires) - qdel(wires) - wires = null + QDEL_NULL(wires) if(coinbox) - qdel(coinbox) - coinbox = null + QDEL_NULL(coinbox) ..() /obj/machinery/vending/splashable() diff --git a/code/game/machinery/washing_machine.dm b/code/game/machinery/washing_machine.dm index d376d5a172e..47d8bc2e0a1 100644 --- a/code/game/machinery/washing_machine.dm +++ b/code/game/machinery/washing_machine.dm @@ -114,8 +114,7 @@ WL.amount = HH.amount WL.source_string = HH.source_string WL.name = HH.source_string ? "wet [HH.source_string] leather" : "wet leather" - qdel(HH) - HH = null + QDEL_NULL(HH) if(crayon) var/color @@ -153,11 +152,9 @@ new_jumpsuit_icon_state = J.icon_state new_jumpsuit_item_state = J.item_state new_jumpsuit_name = J.name - qdel(J) - J = null + QDEL_NULL(J) break - qdel(J) - J = null + QDEL_NULL(J) for(var/T in typesof(/obj/item/clothing/gloves)) var/obj/item/clothing/gloves/G = new T if(color == G._color) @@ -165,53 +162,43 @@ new_glove_icon_state = G.icon_state new_glove_item_state = G.item_state new_glove_name = G.name - qdel(G) - G = null + QDEL_NULL(G) break - qdel(G) - G = null + QDEL_NULL(G) for(var/T in typesof(/obj/item/clothing/shoes)) var/obj/item/clothing/shoes/S = new T if(color == S._color) new_shoe_icon = S.icon new_shoe_icon_state = S.icon_state new_shoe_name = S.name - qdel(S) - S = null + QDEL_NULL(S) break - qdel(S) - S = null + QDEL_NULL(S) for(var/T in typesof(/obj/item/weapon/bedsheet)) var/obj/item/weapon/bedsheet/B = new T if(color == B._color) new_sheet_icon = B.icon new_sheet_icon_state = B.icon_state new_sheet_name = B.name - qdel(B) - B = null + QDEL_NULL(B) break - qdel(B) - B = null + QDEL_NULL(B) for(var/T in typesof(/obj/item/clothing/head/soft)) var/obj/item/clothing/head/soft/H = new T if(color == H._color) new_softcap_icon = H.icon new_softcap_icon_state = H.icon_state new_softcap_name = H.name - qdel(H) - H = null + QDEL_NULL(H) break - qdel(H) - H = null + QDEL_NULL(H) for(var/T in typesof(/obj/item/stack/cable_coil)) var/obj/item/stack/cable_coil/test = new T if(test._color == color) ccoil_test = 1 - qdel(test) - test = null + QDEL_NULL(test) break - qdel(test) - test = null + QDEL_NULL(test) if(new_jumpsuit_icon_state && new_jumpsuit_name) for(var/obj/item/clothing/under/J in contents) J.icon = new_jumpsuit_icon @@ -259,8 +246,7 @@ for(var/obj/item/stack/cable_coil/H in contents) H._color = color H.icon_state = "coil_[color]" - qdel(crayon) - crayon = null + QDEL_NULL(crayon) if( locate(/mob,contents)) wash_state = 7 @@ -306,8 +292,7 @@ var/obj/item/weapon/grab/G = W if(ishuman(G.assailant) && isliving(G.affecting) && !is_in_blacklist(G.affecting)) G.affecting.forceMove(src) - qdel(G) - G = null + QDEL_NULL(G) wash_state = 3 else to_chat(user, "\The [src] is full.") diff --git a/code/game/mecha/combat/marauder.dm b/code/game/mecha/combat/marauder.dm index ac6bf8ab44f..73a35ca7bb2 100644 --- a/code/game/mecha/combat/marauder.dm +++ b/code/game/mecha/combat/marauder.dm @@ -80,8 +80,7 @@ if(equipment.len)//Now to remove it and equip anew. for(ME in equipment) equipment -= ME - qdel(ME) - ME = null + QDEL_NULL(ME) new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/scattershot(src) new /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack(src) new /obj/item/mecha_parts/mecha_equipment/teleporter(src) diff --git a/code/game/mecha/equipment/mecha_equipment.dm b/code/game/mecha/equipment/mecha_equipment.dm index a53c803b0be..ed07ac67a2a 100644 --- a/code/game/mecha/equipment/mecha_equipment.dm +++ b/code/game/mecha/equipment/mecha_equipment.dm @@ -55,8 +55,7 @@ src.update_chassis_page() chassis.occupant_message("The [src] is destroyed!") chassis.log_append_to_last("[src] is destroyed.",1) - qdel(linked_spell) - linked_spell = null + QDEL_NULL(linked_spell) chassis.refresh_spells() if(istype(src, /obj/item/mecha_parts/mecha_equipment/weapon)) chassis.occupant << sound('sound/mecha/weapdestr.ogg',volume=50) @@ -124,8 +123,7 @@ chassis.selected = null update_chassis_page() chassis.log_message("[src] removed from equipment.") - qdel(linked_spell) - linked_spell = null + QDEL_NULL(linked_spell) chassis.refresh_spells() chassis = null set_ready_state(1) diff --git a/code/game/mecha/equipment/passive/passive.dm b/code/game/mecha/equipment/passive/passive.dm index a55b34bb448..dc9ddf311ff 100644 --- a/code/game/mecha/equipment/passive/passive.dm +++ b/code/game/mecha/equipment/passive/passive.dm @@ -15,8 +15,7 @@ /obj/item/mecha_parts/mecha_equipment/passive/rack/Destroy() rack.empty_contents_to(chassis) - qdel(rack) - rack = null + QDEL_NULL(rack) ..() /obj/item/mecha_parts/mecha_equipment/passive/rack/detach(atom/moveto=null) @@ -57,4 +56,4 @@ if(..()) if(istype(W)) return 1 - return 0 \ No newline at end of file + return 0 diff --git a/code/game/mecha/equipment/tools/tools.dm b/code/game/mecha/equipment/tools/tools.dm index 1ece7ed114e..050e05c1d28 100644 --- a/code/game/mecha/equipment/tools/tools.dm +++ b/code/game/mecha/equipment/tools/tools.dm @@ -552,12 +552,9 @@ red_tool_list += src /obj/item/mecha_parts/mecha_equipment/tool/red/Destroy() - qdel(RPD) - RPD = null - qdel(RCD) - RCD = null - qdel(sock) - sock = null + QDEL_NULL(RPD) + QDEL_NULL(RCD) + QDEL_NULL(sock) red_tool_list -= src ..() @@ -923,8 +920,7 @@ /obj/item/mecha_parts/mecha_equipment/repair_droid/Destroy() chassis.overlays -= droid_overlay - qdel(pr_repair_droid) - pr_repair_droid = null + QDEL_NULL(pr_repair_droid) ..() /obj/item/mecha_parts/mecha_equipment/repair_droid/detach() @@ -1021,8 +1017,7 @@ return /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/Destroy() - qdel(pr_energy_relay) - pr_energy_relay = null + QDEL_NULL(pr_energy_relay) ..() /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/detach() @@ -1161,8 +1156,7 @@ return /obj/item/mecha_parts/mecha_equipment/generator/Destroy() - qdel(pr_mech_generator) - pr_mech_generator = null + QDEL_NULL(pr_mech_generator) ..() /obj/item/mecha_parts/mecha_equipment/generator/proc/init() @@ -1431,10 +1425,8 @@ pr_switchtool.toggle() /obj/item/mecha_parts/mecha_equipment/tool/switchtool/Destroy() - qdel(switchtool) - switchtool = null - qdel(pr_switchtool) - pr_switchtool = null + QDEL_NULL(switchtool) + QDEL_NULL(pr_switchtool) ..() /obj/item/mecha_parts/mecha_equipment/tool/switchtool/action(atom/target) @@ -1572,8 +1564,7 @@ collector.connected_module = src /obj/item/mecha_parts/mecha_equipment/tool/collector/Destroy() - qdel(collector) - collector = null + QDEL_NULL(collector) ..() /obj/item/mecha_parts/mecha_equipment/tool/collector/action(atom/target) diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index fb92750e56d..ae019ff299c 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -161,36 +161,26 @@ mech_parts.Cut() //We don't need this list anymore, too. mechas_list -= src //global mech list if(cell) - qdel(cell) - cell = null + QDEL_NULL(cell) if(internal_tank) - qdel(internal_tank) - internal_tank = null + QDEL_NULL(internal_tank) if(cabin_air) - qdel(cabin_air) - cabin_air = null + QDEL_NULL(cabin_air) connected_port = null if(radio) - qdel(radio) - radio = null + QDEL_NULL(radio) if(electropack) - qdel(electropack) - electropack = null + QDEL_NULL(electropack) if(tracking) - qdel(tracking) - tracking = null + QDEL_NULL(tracking) if(pr_int_temp_processor) - qdel(pr_int_temp_processor) - pr_int_temp_processor = null + QDEL_NULL(pr_int_temp_processor) if(pr_inertial_movement) - qdel(pr_inertial_movement) - pr_inertial_movement = null + QDEL_NULL(pr_inertial_movement) if(pr_give_air) - qdel(pr_give_air) - pr_give_air = null + QDEL_NULL(pr_give_air) if(pr_internal_damage) - qdel(pr_internal_damage) - pr_internal_damage = null + QDEL_NULL(pr_internal_damage) selected = null ..() @@ -2192,8 +2182,7 @@ if(t_air) t_air.merge(removed) else //just delete the cabin gas, we're in space or some shit - qdel(removed) - removed = null + QDEL_NULL(removed) else return stop() @@ -2234,8 +2223,7 @@ if(mecha.loc && hascall(mecha.loc,"assume_air")) mecha.loc.assume_air(leaked_gas) else - qdel(leaked_gas) - leaked_gas = null + QDEL_NULL(leaked_gas) if(mecha.hasInternalDamage(MECHA_INT_SHORT_CIRCUIT)) if(mecha.get_charge()) spark(mecha, 2, FALSE) diff --git a/code/game/mecha/mecha_construction_chassis.dm b/code/game/mecha/mecha_construction_chassis.dm index 1fb54fc5222..48dbe6fe108 100644 --- a/code/game/mecha/mecha_construction_chassis.dm +++ b/code/game/mecha/mecha_construction_chassis.dm @@ -3,8 +3,7 @@ /datum/construction/mecha_chassis/custom_action(step, atom/used_atom, mob/user) user.visible_message("[user] has connected [used_atom] to [holder].", "You connect [used_atom] to [holder]") holder.overlays += used_atom.icon_state+"+o" - qdel (used_atom) - used_atom = null + QDEL_NULL (used_atom) return 1 /datum/construction/mecha_chassis/action(atom/used_atom,mob/user as mob) @@ -194,4 +193,4 @@ const_holder.setDensity(TRUE) spawn() qdel (src) - return \ No newline at end of file + return diff --git a/code/game/mecha/medical/odysseus.dm b/code/game/mecha/medical/odysseus.dm index ac7b3b0b1f2..e3cd1f36d48 100644 --- a/code/game/mecha/medical/odysseus.dm +++ b/code/game/mecha/medical/odysseus.dm @@ -25,8 +25,7 @@ mech_parts.Add(hud) /obj/mecha/medical/odysseus/Destroy() - qdel(hud) - hud = null + QDEL_NULL(hud) return ..() /obj/mecha/medical/odysseus/moved_inside(var/mob/living/carbon/human/H as mob) @@ -71,4 +70,4 @@ new /obj/item/mecha_parts/mecha_equipment/tool/sleeper(src) new /obj/item/mecha_parts/mecha_equipment/tool/syringe_gun(src) new /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay(src) - return \ No newline at end of file + return diff --git a/code/game/mecha/working/clarke.dm b/code/game/mecha/working/clarke.dm index 2466c63ffe4..4c1b1b44556 100644 --- a/code/game/mecha/working/clarke.dm +++ b/code/game/mecha/working/clarke.dm @@ -31,8 +31,7 @@ mech_parts.Add(scrubber) /obj/mecha/working/clarke/Destroy() - qdel(scrubber) - scrubber = null + QDEL_NULL(scrubber) ..() /obj/mecha/working/clarke/check_for_support() @@ -144,4 +143,4 @@ else src.occupant_message("[name] is not connected to the port at the moment.") return - return \ No newline at end of file + return diff --git a/code/game/objects/effects/decals/Cleanable/misc.dm b/code/game/objects/effects/decals/Cleanable/misc.dm index 8da7d16bab7..9fa3452e697 100644 --- a/code/game/objects/effects/decals/Cleanable/misc.dm +++ b/code/game/objects/effects/decals/Cleanable/misc.dm @@ -190,8 +190,7 @@ name = "dry [src.name]" icon_state = "vomit_[rand(1,4)]_dry" amount = 0 - qdel(reagents) - reagents = null + QDEL_NULL(reagents) /obj/effect/decal/cleanable/tomato_smudge name = "tomato smudge" diff --git a/code/game/objects/effects/decals/chemical_puff.dm b/code/game/objects/effects/decals/chemical_puff.dm index 7ad1ee42498..df365d551d5 100644 --- a/code/game/objects/effects/decals/chemical_puff.dm +++ b/code/game/objects/effects/decals/chemical_puff.dm @@ -13,8 +13,7 @@ icon += color /obj/effect/decal/chemical_puff/Destroy() - qdel(reagents) - reagents = null + QDEL_NULL(reagents) ..() // Reacts with the current turf and its contents diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm index 2629d1c314a..4b5b3405a2f 100644 --- a/code/game/objects/effects/effect_system.dm +++ b/code/game/objects/effects/effect_system.dm @@ -265,8 +265,7 @@ steam.start() -- spawns the effect /obj/effect/smoke/Destroy() if(reagents) reagents.my_atom = null - qdel(reagents) - reagents = null + QDEL_NULL(reagents) ..() ///////////////////////////////////////////// @@ -548,8 +547,7 @@ steam.start() -- spawns the effect step(smoke,direction) spawn(150+rand(10,30)) if(smoke) - qdel(smoke) - smoke = null + QDEL_NULL(smoke) src.total_smoke-- // Goon compat. diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 1316cfc1e6d..c5717b19a63 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -1074,8 +1074,7 @@ wielded.wielding = null user.u_equip(wielded,1) if(wielded) - qdel(wielded) - wielded = null + QDEL_NULL(wielded) update_wield(user) /obj/item/proc/update_wield(mob/user) diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index 6184b59d461..1ba05d66b9f 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -539,8 +539,7 @@ var/global/msg_id = 0 if(cartridge) if (cartridge.radio) cartridge.radio.hostpda = null - qdel(cartridge) - cartridge = null + QDEL_NULL(cartridge) for(var/A in applications) qdel(A) diff --git a/code/game/objects/items/devices/PDA/apps/purchased.dm b/code/game/objects/items/devices/PDA/apps/purchased.dm index 7d9d7a3eeca..8d89c481d81 100644 --- a/code/game/objects/items/devices/PDA/apps/purchased.dm +++ b/code/game/objects/items/devices/PDA/apps/purchased.dm @@ -99,8 +99,7 @@ /datum/pda_app/station_map/Destroy() if (holomap) - qdel(holomap) - holomap = null + QDEL_NULL(holomap) ..() /datum/pda_app/newsreader @@ -188,4 +187,4 @@ var/turf/T = get_turf(pda_device) playsound(T, 'sound/machines/twobeep.ogg', 50, 1) for (var/mob/O in hearers(3, T)) - O.show_message(text("[bicon(pda_device)] [channel_name ? "Breaking news from [channel_name]" : "Attention! Wanted issue distributed!"]!")) \ No newline at end of file + O.show_message(text("[bicon(pda_device)] [channel_name ? "Breaking news from [channel_name]" : "Attention! Wanted issue distributed!"]!")) diff --git a/code/game/objects/items/devices/PDA/cart/cart.dm b/code/game/objects/items/devices/PDA/cart/cart.dm index bb77121f564..c11aa9f6ddb 100644 --- a/code/game/objects/items/devices/PDA/cart/cart.dm +++ b/code/game/objects/items/devices/PDA/cart/cart.dm @@ -10,7 +10,7 @@ // -- What we use to communicate with bots var/obj/item/radio/integrated/radio = null var/radio_type = null - + // -- For the IAA and etc var/fax_pings = FALSE @@ -53,24 +53,19 @@ /obj/item/weapon/cartridge/Destroy() if(radio) - qdel(radio) - radio = null + QDEL_NULL(radio) if(atmos_analys) - qdel(atmos_analys) - atmos_analys = null + QDEL_NULL(atmos_analys) if(robo_analys) - qdel(robo_analys) - robo_analys = null + QDEL_NULL(robo_analys) if(dev_analys) - qdel(dev_analys) - dev_analys = null + QDEL_NULL(dev_analys) if(integ_hailer) - qdel(integ_hailer) - dev_analys = null + QDEL_NULL(integ_hailer) ..() /datum/pda_app/cart @@ -116,4 +111,4 @@ return /datum/pda_app/cart/scanner/proc/afterattack(atom/A, mob/user, proximity_flag) - return \ No newline at end of file + return diff --git a/code/game/objects/items/devices/PDA/cart/misc.dm b/code/game/objects/items/devices/PDA/cart/misc.dm index 591b60b22aa..2538464e186 100644 --- a/code/game/objects/items/devices/PDA/cart/misc.dm +++ b/code/game/objects/items/devices/PDA/cart/misc.dm @@ -200,8 +200,7 @@ cart_cam = new /obj/item/device/camera/cartridge(src) /obj/item/weapon/cartridge/camera/Destroy() - qdel(cart_cam) - cart_cam = null + QDEL_NULL(cart_cam) for(var/obj/item/weapon/photo/PH in stored_photos) qdel(PH) stored_photos = list() diff --git a/code/game/objects/items/devices/PDA/cart/security.dm b/code/game/objects/items/devices/PDA/cart/security.dm index b94ca13d836..0ed7c71b1c9 100644 --- a/code/game/objects/items/devices/PDA/cart/security.dm +++ b/code/game/objects/items/devices/PDA/cart/security.dm @@ -155,8 +155,7 @@ if ( !(C:blood_DNA) ) to_chat(user, "No blood found on [C]") if(C:blood_DNA) - qdel(C:blood_DNA) - C:blood_DNA = null + QDEL_NULL(C:blood_DNA) else to_chat(user, "Blood found on [C]. Analysing...") spawn(15) @@ -171,4 +170,4 @@ /datum/pda_app/cart/security_records, /datum/pda_app/cart/scanner/hailer, /datum/pda_app/cart/secbot, - ) \ No newline at end of file + ) diff --git a/code/game/objects/items/devices/chameleonproj.dm b/code/game/objects/items/devices/chameleonproj.dm index 2f230b3bb2c..bd23ef9a69c 100644 --- a/code/game/objects/items/devices/chameleonproj.dm +++ b/code/game/objects/items/devices/chameleonproj.dm @@ -61,8 +61,7 @@ if(active_dummy) eject_all() //playsound(src, 'sound/effects/pop.ogg', 100, 1, -6) - qdel(active_dummy) - active_dummy = null + QDEL_NULL(active_dummy) to_chat(usr, "You deactivate [src].") var/obj/effect/overlay/T = new/obj/effect/overlay(get_turf(src)) T.icon = 'icons/effects/effects.dmi' @@ -79,8 +78,7 @@ return var/obj/effect/dummy/chameleon/C = new/obj/effect/dummy/chameleon(usr.loc) C.activate(O, usr, saved_icon, saved_icon_state, saved_overlays, src) - qdel(O) - O = null + QDEL_NULL(O) to_chat(usr, "You activate [src].") var/obj/effect/overlay/T = new/obj/effect/overlay(get_turf(src)) T.icon = 'icons/effects/effects.dmi' diff --git a/code/game/objects/items/devices/deskbell.dm b/code/game/objects/items/devices/deskbell.dm index a93e1165db0..4f55aa654ad 100644 --- a/code/game/objects/items/devices/deskbell.dm +++ b/code/game/objects/items/devices/deskbell.dm @@ -305,8 +305,7 @@ else code = S.code - qdel(W) - W = null + QDEL_NULL(W) has_signaler = 1 update_icon() return diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm index c2c538d2c52..10060b389ca 100644 --- a/code/game/objects/items/devices/flash.dm +++ b/code/game/objects/items/devices/flash.dm @@ -190,8 +190,7 @@ animation.master = user flick("blspell", animation) sleep(5) - qdel(animation) - animation = null + QDEL_NULL(animation) for(var/mob/living/carbon/M in oviewers(3, null)) if(prob(50)) diff --git a/code/game/objects/items/devices/healthanalyzerpro.dm b/code/game/objects/items/devices/healthanalyzerpro.dm index 20e2f60cb5b..26e037af7a6 100644 --- a/code/game/objects/items/devices/healthanalyzerpro.dm +++ b/code/game/objects/items/devices/healthanalyzerpro.dm @@ -231,5 +231,4 @@ if(do_mob(user, O, 1 SECONDS)) immune.attack(O,user) last_scantime = world.time - qdel(immune) - immune = null + QDEL_NULL(immune) diff --git a/code/game/objects/items/devices/hologram_projector.dm b/code/game/objects/items/devices/hologram_projector.dm index 462c2c595d7..8258585318b 100644 --- a/code/game/objects/items/devices/hologram_projector.dm +++ b/code/game/objects/items/devices/hologram_projector.dm @@ -14,11 +14,9 @@ /obj/item/device/hologram_projector/Destroy() if(holoperson) holoperson.unequip_everything() - qdel(holoperson) - holoperson = null + QDEL_NULL(holoperson) if(ray) - qdel(ray) - ray = null + QDEL_NULL(ray) ..() /mob/living/simple_animal/hologram/advanced/projector @@ -43,7 +41,7 @@ qdel(projector.ray) projector = null ..() - + /obj/item/device/hologram_projector/proc/clear_holo() set_light(0) if(holoperson) @@ -53,18 +51,16 @@ animate(holoperson, alpha = 0, time = 5) spawn(5) holoperson.set_light(0) - qdel(ray) - ray = null + QDEL_NULL(ray) holoperson.unequip_everything() - qdel(holoperson) - holoperson = null + QDEL_NULL(holoperson) icon_state = "shield0" return 1 /obj/item/device/hologram_projector/emp_act() if(holoperson) clear_holo() - + /obj/item/device/hologram_projector/attack_self() if(polling_ghosts) return @@ -105,8 +101,7 @@ if(!player) to_chat(usr, "Hologram generation failed!") polling_ghosts = FALSE - qdel(recruiter) - recruiter = null + QDEL_NULL(recruiter) return polling_ghosts = FALSE @@ -143,7 +138,7 @@ return 1 projector.clear_holo() //If not, we want to get rid of the hologram. - + /mob/living/simple_animal/hologram/advanced/projector/Move() ..() if(!projector) @@ -203,4 +198,4 @@ var/datum/mind/M = holoperson.mind M.transfer_to(integratedpai.pai) clear_holo() - ..() \ No newline at end of file + ..() diff --git a/code/game/objects/items/devices/holomap.dm b/code/game/objects/items/devices/holomap.dm index 9c9574f2b7a..850573786aa 100644 --- a/code/game/objects/items/devices/holomap.dm +++ b/code/game/objects/items/devices/holomap.dm @@ -18,8 +18,7 @@ //delayer = new(0, ARBITRARILY_LARGE_NUMBER) /obj/item/device/holomap/Destroy() - //qdel(delayer) - //delayer = null + //QDEL_NULL(delayer) if (viewing) viewing.mob.unregister_event(/event/logout, src, .proc/mob_logout) diff --git a/code/game/objects/items/devices/instruments.dm b/code/game/objects/items/devices/instruments.dm index 1d6cbe516b1..000a34ea398 100644 --- a/code/game/objects/items/devices/instruments.dm +++ b/code/game/objects/items/devices/instruments.dm @@ -15,8 +15,7 @@ song.instrumentExt = instrumentExt /obj/item/device/instrument/Destroy() - qdel(song) - song = null + QDEL_NULL(song) ..() /obj/item/device/instrument/initialize() diff --git a/code/game/objects/items/devices/lightreplacer.dm b/code/game/objects/items/devices/lightreplacer.dm index 52bce7c2edf..82bbad8cc59 100644 --- a/code/game/objects/items/devices/lightreplacer.dm +++ b/code/game/objects/items/devices/lightreplacer.dm @@ -316,8 +316,7 @@ if(usr) to_chat(usr, "\The [src] doesn't have enough glass to make that!") if(L) - qdel(L) - L = null + QDEL_NULL(L) return 1 glass -= (L.starting_materials[MAT_GLASS] * prod_eff) L.switchcount = prod_quality @@ -345,8 +344,7 @@ recycledglass += (L.materials.storage[MAT_GLASS] * 0.25) if(LIGHT_BURNED) recycledglass += (L.materials.storage[MAT_GLASS] * 0.50) - qdel(L) - L = null + QDEL_NULL(L) if(recycledglass) to_chat(usr, "\The [src] recycles its waste box, producing [recycledglass] units of glass.") add_glass(recycledglass, force_fill = 2) diff --git a/code/game/objects/items/devices/powersink.dm b/code/game/objects/items/devices/powersink.dm index a7519ad2a79..d9aaabc0a65 100644 --- a/code/game/objects/items/devices/powersink.dm +++ b/code/game/objects/items/devices/powersink.dm @@ -34,8 +34,7 @@ set_light(0) processing_objects.Remove(src) if(power_connection) - qdel(power_connection) - power_connection = null + QDEL_NULL(power_connection) . = ..() /obj/item/device/powersink/attackby(var/obj/item/I, var/mob/user) diff --git a/code/game/objects/items/devices/rigbuilding.dm b/code/game/objects/items/devices/rigbuilding.dm index 3d5a15b51d5..b57f9293e6b 100644 --- a/code/game/objects/items/devices/rigbuilding.dm +++ b/code/game/objects/items/devices/rigbuilding.dm @@ -30,8 +30,7 @@ icon_state = "rigframe_0" // shouldn't happen /obj/item/device/rigframe/Destroy() - qdel(cell) - cell = null + QDEL_NULL(cell) ..() /obj/item/device/rigframe/attackby(obj/item/weapon/W, mob/user) @@ -106,8 +105,7 @@ to_chat(user, "You secure the plating on \the [src].") W.playtoolsound(src, 50) result = new result(get_turf(src.loc)) - qdel(result.cell) - result.cell = null + QDEL_NULL(result.cell) cell.forceMove(result) result.cell = cell cell = null diff --git a/code/game/objects/items/gum.dm b/code/game/objects/items/gum.dm index 9deaf7b6473..c52586b10ac 100644 --- a/code/game/objects/items/gum.dm +++ b/code/game/objects/items/gum.dm @@ -157,8 +157,7 @@ target.ex_act(1) if(isobj(target)) if(target) - qdel(target) - target = null + QDEL_NULL(target) qdel(src) /obj/item/gum/proc/chew(mob/user) diff --git a/code/game/objects/items/incense.dm b/code/game/objects/items/incense.dm index 2852002f82d..eda9f82772c 100644 --- a/code/game/objects/items/incense.dm +++ b/code/game/objects/items/incense.dm @@ -458,8 +458,7 @@ /obj/item/weapon/thurible/Destroy() if (incense) - qdel(incense) - incense = null + QDEL_NULL(incense) ..() /obj/item/weapon/thurible/examine(mob/user) diff --git a/code/game/objects/items/mountable_frames/station_map.dm b/code/game/objects/items/mountable_frames/station_map.dm index 8a3c9c937b7..b6069fbd9cd 100644 --- a/code/game/objects/items/mountable_frames/station_map.dm +++ b/code/game/objects/items/mountable_frames/station_map.dm @@ -109,7 +109,6 @@ S.dir = holder.dir S.update_icon() - qdel (holder) - holder = null + QDEL_NULL (holder) feedback_inc("station_map_created",1) diff --git a/code/game/objects/items/mountable_frames/trophy_mount.dm b/code/game/objects/items/mountable_frames/trophy_mount.dm index a6932496f67..5591ac244e3 100644 --- a/code/game/objects/items/mountable_frames/trophy_mount.dm +++ b/code/game/objects/items/mountable_frames/trophy_mount.dm @@ -19,8 +19,7 @@ /obj/item/mounted/frame/trophy_mount/Destroy() if(held_item) - qdel(held_item) - held_item = null + QDEL_NULL(held_item) ..() /obj/item/mounted/frame/trophy_mount/update_icon() @@ -154,8 +153,7 @@ /obj/structure/trophy_mount/Destroy() if(held_item) - qdel(held_item) - held_item = null + QDEL_NULL(held_item) ..() /obj/structure/trophy_mount/examine(mob/user) diff --git a/code/game/objects/items/robot/robot_items/robot_hypospray.dm b/code/game/objects/items/robot/robot_items/robot_hypospray.dm index 008ecf84329..ee2b11df80d 100644 --- a/code/game/objects/items/robot/robot_items/robot_hypospray.dm +++ b/code/game/objects/items/robot/robot_items/robot_hypospray.dm @@ -18,8 +18,7 @@ /obj/item/weapon/reagent_containers/borghypo/New(loc) ..(loc) - qdel(reagents) - reagents = null + QDEL_NULL(reagents) for(var/reagent in reagent_ids) var/datum/reagents/reagents = new(volume) diff --git a/code/game/objects/items/robot/robot_items/robot_spawner.dm b/code/game/objects/items/robot/robot_items/robot_spawner.dm index e34ead75fd6..664f3be65ee 100644 --- a/code/game/objects/items/robot/robot_items/robot_spawner.dm +++ b/code/game/objects/items/robot/robot_items/robot_spawner.dm @@ -66,8 +66,7 @@ /obj/item/weapon/robot_spawner/proc/recruiter_recruited(mob/dead/observer/player) if(player) - qdel(recruiter) - recruiter = null + QDEL_NULL(recruiter) busy = FALSE charge-- spark(src, 4) diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm index 55092c007eb..e35bc3f1fa7 100644 --- a/code/game/objects/items/robot/robot_parts.dm +++ b/code/game/objects/items/robot/robot_parts.dm @@ -77,18 +77,12 @@ /obj/item/robot_parts/robot_suit/Destroy() ..() - qdel(l_arm) - l_arm = null - qdel(r_arm) - r_arm = null - qdel(l_leg) - l_leg = null - qdel(r_leg) - r_leg = null - qdel(chest) - chest = null - qdel(head) - head = null + QDEL_NULL(l_arm) + QDEL_NULL(r_arm) + QDEL_NULL(l_leg) + QDEL_NULL(r_leg) + QDEL_NULL(chest) + QDEL_NULL(head) /obj/item/robot_parts/robot_suit/proc/updateicon() src.overlays.len = 0 @@ -306,8 +300,7 @@ if(user.drop_item(W)) to_chat(user, "You install some manipulators and modify the head, creating a functional spider-bot!") new /mob/living/simple_animal/spiderbot(get_turf(loc)) - qdel(W) - W = null + QDEL_NULL(W) qdel(src) return return diff --git a/code/game/objects/items/stacks/misc.dm b/code/game/objects/items/stacks/misc.dm index c9c400b911e..149e307305a 100644 --- a/code/game/objects/items/stacks/misc.dm +++ b/code/game/objects/items/stacks/misc.dm @@ -20,8 +20,7 @@ /obj/item/stack/rods/Destroy() ..() if(active) - qdel(active) - active = null + QDEL_NULL(active) /obj/item/stack/rods/can_drag_use(mob/user, turf/T) if(user.Adjacent(T) && T.canBuildLattice(src)) //can we place here @@ -29,8 +28,7 @@ if(use(1)) //place and use rod return 1 else - qdel(active) //otherwise remove the draggable screen - active = null + QDEL_NULL(active) //otherwise remove the draggable screen /obj/item/stack/rods/drag_use(mob/user, turf/T) playsound(T, 'sound/weapons/Genhit.ogg', 25, 1) @@ -42,8 +40,7 @@ /obj/item/stack/rods/dropped() ..() if(active) - qdel(active) - active = null + QDEL_NULL(active) /obj/item/stack/rods/afterattack(atom/Target, mob/user, adjacent, params) var/busy = 0 diff --git a/code/game/objects/items/stacks/tiles/tiles.dm b/code/game/objects/items/stacks/tiles/tiles.dm index 6c41107a42e..bd785cfa0e0 100644 --- a/code/game/objects/items/stacks/tiles/tiles.dm +++ b/code/game/objects/items/stacks/tiles/tiles.dm @@ -25,8 +25,7 @@ /obj/item/stack/tile/metal/Destroy() ..() if(active) - qdel(active) - active = null + QDEL_NULL(active) /obj/item/stack/tile/metal/attack_self(mob/user) if(!active) //Start click drag construction @@ -43,8 +42,7 @@ if(use(1)) //place and use rod return 1 else - qdel(active) //otherwise remove the draggable screen - active = null + QDEL_NULL(active) //otherwise remove the draggable screen /obj/item/stack/tile/metal/drag_use(mob/user, turf/T) if(T.canBuildPlating() == BUILD_SUCCESS) //This deletes lattices, only necessary for BUILD_SUCCESS @@ -61,8 +59,7 @@ /obj/item/stack/tile/metal/dropped() ..() if(active) - qdel(active) - active = null + QDEL_NULL(active) /obj/item/stack/tile/metal/proc/build(turf/S as turf) if(S.air) diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 3b1960d1282..7a213551175 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -294,8 +294,7 @@ if(istype(I, /obj/item/toy/ammo/crossbow)) if(bullets <= 4) if(user.drop_item(I)) - qdel(I) - I = null + QDEL_NULL(I) bullets++ to_chat(user, "You load the foam dart into \the [src].") else @@ -332,8 +331,7 @@ for(var/mob/O in viewers(world.view, D)) O.show_message(text("[] was hit by the foam dart!", M), 1) new /obj/item/toy/ammo/crossbow(M.loc) - qdel(D) - D = null + QDEL_NULL(D) return for(var/atom/A in D.loc) @@ -341,16 +339,14 @@ continue if(A.density) new /obj/item/toy/ammo/crossbow(A.loc) - qdel(D) - D = null + QDEL_NULL(D) sleep(1) spawn(10) if(D) new /obj/item/toy/ammo/crossbow(D.loc) - qdel(D) - D = null + QDEL_NULL(D) return else if (bullets == 0) @@ -737,8 +733,7 @@ if(ismob(T) && T:client) to_chat(T:client, "[user] has sprayed you with \the [src]!") sleep(4) - qdel(D) - D = null + QDEL_NULL(D) return diff --git a/code/game/objects/items/trader.dm b/code/game/objects/items/trader.dm index aecbdac1102..bd923d16d85 100644 --- a/code/game/objects/items/trader.dm +++ b/code/game/objects/items/trader.dm @@ -319,8 +319,7 @@ /obj/structure/fakecargoposter/Destroy() for(var/atom/movable/A in cash.contents) A.forceMove(loc) - qdel(cash) - cash = null + QDEL_NULL(cash) ..() /obj/structure/fakecargoposter/attackby(var/obj/item/weapon/W, mob/user) diff --git a/code/game/objects/items/weapons/RCL.dm b/code/game/objects/items/weapons/RCL.dm index 9b94335f084..e162c386754 100644 --- a/code/game/objects/items/weapons/RCL.dm +++ b/code/game/objects/items/weapons/RCL.dm @@ -58,8 +58,7 @@ to_chat(user, "It contains [loaded.amount]/90 cables.") /obj/item/weapon/rcl/Destroy() - qdel(loaded) - loaded = null + QDEL_NULL(loaded) last = null active = 0 set_move_event() @@ -88,8 +87,7 @@ update_icon() if(loaded && !loaded.amount) to_chat(user, "The last of the cables unreel from \the [src].") - qdel(loaded) - loaded = null + QDEL_NULL(loaded) active = 0 return 1 return 0 diff --git a/code/game/objects/items/weapons/explosives.dm b/code/game/objects/items/weapons/explosives.dm index 4a3ad218c28..766fd9a7e4a 100644 --- a/code/game/objects/items/weapons/explosives.dm +++ b/code/game/objects/items/weapons/explosives.dm @@ -22,8 +22,7 @@ /obj/item/weapon/c4/Destroy() if(wires) - qdel(wires) - wires = null + QDEL_NULL(wires) ..() @@ -120,8 +119,7 @@ target.ex_act(1) //if (isobj(target)) // if (target) - // qdel(target) If it survives ex_act(1) it's possible that it's not something that's meant to be destroyable. - // target = null + // QDEL_NULL(target) If it survives ex_act(1) it's possible that it's not something that's meant to be destroyable. qdel(src) /obj/item/weapon/c4/attack(mob/M as mob, mob/user as mob, def_zone) diff --git a/code/game/objects/items/weapons/grenades/ghettobomb.dm b/code/game/objects/items/weapons/grenades/ghettobomb.dm index 7bb4c93a2fa..5494a2b575d 100644 --- a/code/game/objects/items/weapons/grenades/ghettobomb.dm +++ b/code/game/objects/items/weapons/grenades/ghettobomb.dm @@ -10,8 +10,7 @@ user.put_in_hands(W) to_chat(user, "You stuff the [I] into the [src], emptying the contents beforehand.") W.underlays += image(src.icon, icon_state = src.icon_state) - qdel(I) - I = null + QDEL_NULL(I) qdel(src) else if(I.is_wirecutter(user)) to_chat(user, "You cut out the top and bottom of \the [src] with \the [I].") @@ -161,8 +160,7 @@ if(leg && !(leg.status & ORGAN_DESTROYED)) leg.droplimb(1,0) - qdel(H.legcuffed) - H.legcuffed = null + QDEL_NULL(H.legcuffed) unlock_atom(H) boomtrap.IED = null qdel(src) diff --git a/code/game/objects/items/weapons/grenades/smokebomb.dm b/code/game/objects/items/weapons/grenades/smokebomb.dm index 7d80d9feb62..e85cdfec3a5 100644 --- a/code/game/objects/items/weapons/grenades/smokebomb.dm +++ b/code/game/objects/items/weapons/grenades/smokebomb.dm @@ -17,8 +17,7 @@ /obj/item/weapon/grenade/smokebomb/Destroy() if(smoke) - qdel(smoke) - smoke = null + QDEL_NULL(smoke) ..() /obj/item/weapon/grenade/smokebomb/prime() diff --git a/code/game/objects/items/weapons/kitchen.dm b/code/game/objects/items/weapons/kitchen.dm index 23febe9126c..f0dad67dcaf 100644 --- a/code/game/objects/items/weapons/kitchen.dm +++ b/code/game/objects/items/weapons/kitchen.dm @@ -535,9 +535,7 @@ var/cooldown = 0 //shield bash cooldown. based on world.time /obj/item/weapon/tray/Destroy() - for(var/atom/thing in carrying) - qdel(thing) - carrying = null + QDEL_LIST_NULL(carrying) ..() /obj/item/weapon/tray/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) diff --git a/code/game/objects/items/weapons/melee/energy.dm b/code/game/objects/items/weapons/melee/energy.dm index 88aba855cda..4dcccfc1688 100644 --- a/code/game/objects/items/weapons/melee/energy.dm +++ b/code/game/objects/items/weapons/melee/energy.dm @@ -423,8 +423,7 @@ if(machete_combined || HF.machete_combined) //Adding a variable to separate the bloodlust from the machete is a lot less lines than copypasting most of the machete code return to_chat(user, "You combine the two [HF] together, making a single scissor-bladed weapon! You feel fucking invincible!") - qdel(HF) - W = null + QDEL_NULL(W) qdel(src) var/B = new /obj/item/weapon/melee/energy/hfmachete/bloodlust(user.loc) user.put_in_hands(B) diff --git a/code/game/objects/items/weapons/null_rod.dm b/code/game/objects/items/weapons/null_rod.dm index d189b3fe860..3929ff7c05f 100644 --- a/code/game/objects/items/weapons/null_rod.dm +++ b/code/game/objects/items/weapons/null_rod.dm @@ -324,7 +324,7 @@ name = "rewind rifle" desc = "The incarnation of looping in gun form. The shooting mechanism has been replaced with looping machinery and will only fire when the Loop happens." icon = 'icons/obj/gun.dmi' - inhand_states = list("left_hand" = 'icons/mob/in-hand/left/guninhands_left.dmi', "right_hand" = 'icons/mob/in-hand/right/guninhands_right.dmi') + inhand_states = list("left_hand" = 'icons/mob/in-hand/left/guninhands_left.dmi', "right_hand" = 'icons/mob/in-hand/right/guninhands_right.dmi') icon_state = "xcomlasergun" item_state = "xcomlasergun" w_class = W_CLASS_MEDIUM @@ -385,8 +385,7 @@ /obj/item/weapon/nullrod/sword/chaos/proc/recruiter_recruited(mob/dead/observer/player) if(player) possessed = TRUE - qdel(recruiter) - recruiter = null + QDEL_NULL(recruiter) awakening = FALSE visible_message("\The [name] awakens!") var/mob/living/simple_animal/shade/sword/S = new(src) @@ -415,8 +414,7 @@ to_chat(S, "You were destroyed!") qdel(S) if(recruiter) - qdel(recruiter) - recruiter = null + QDEL_NULL(recruiter) ..() /obj/item/weapon/nullrod/sword/chaos/attack_ghost(var/mob/dead/observer/O) diff --git a/code/game/objects/items/weapons/storage/bags.dm b/code/game/objects/items/weapons/storage/bags.dm index 7ea01492aa9..19ba939f62d 100644 --- a/code/game/objects/items/weapons/storage/bags.dm +++ b/code/game/objects/items/weapons/storage/bags.dm @@ -460,8 +460,7 @@ var/global/list/plantbag_colour_choices = list("plantbag", "green red stripe", " usr.client.screen -= S //S.dropped(usr) if(!S.amount) - qdel (S) - S = null + QDEL_NULL (S) else S.forceMove(src) @@ -506,8 +505,7 @@ var/global/list/plantbag_colour_choices = list("plantbag", "green red stripe", " N.amount = stacksize S.amount -= stacksize if(!S.amount) - qdel (S) // todo: there's probably something missing here - S = null + QDEL_NULL (S) // todo: there's probably something missing here orient2hud(usr) if(usr.s_active) usr.s_active.show_to(usr) diff --git a/code/game/objects/items/weapons/storage/briefcase.dm b/code/game/objects/items/weapons/storage/briefcase.dm index 97e250008bd..0c1de8b13d1 100644 --- a/code/game/objects/items/weapons/storage/briefcase.dm +++ b/code/game/objects/items/weapons/storage/briefcase.dm @@ -104,8 +104,7 @@ syncuff.charge_detonated = TRUE sleep(3) explosion(get_turf(target), 0, 1, 3, 0) - qdel(casecuff) - casecuff = null + QDEL_NULL(casecuff) return canremove = 0 //can't drop the case cant_drop = 1 @@ -174,8 +173,7 @@ /obj/item/weapon/storage/briefcase/false_bottomed/Destroy() if(stored_item)//since the stored_item isn't in the briefcase' contents we gotta remind the game to delete it here. - qdel(stored_item) - stored_item = null + QDEL_NULL(stored_item) ..() /obj/item/weapon/storage/briefcase/false_bottomed/afterattack(var/atom/A, mob/user) diff --git a/code/game/objects/items/weapons/storage/fancy.dm b/code/game/objects/items/weapons/storage/fancy.dm index e0c23a28b09..aa333b3b13f 100644 --- a/code/game/objects/items/weapons/storage/fancy.dm +++ b/code/game/objects/items/weapons/storage/fancy.dm @@ -325,8 +325,7 @@ create_reagents(15 * storage_slots)//so people can inject cigarettes without opening a packet, now with being able to inject the whole one /obj/item/weapon/storage/fancy/cigarettes/Destroy() - qdel(reagents) - reagents = null + QDEL_NULL(reagents) ..() diff --git a/code/game/objects/items/weapons/storage/secure.dm b/code/game/objects/items/weapons/storage/secure.dm index 780eaf363a5..0312fe8dd8f 100644 --- a/code/game/objects/items/weapons/storage/secure.dm +++ b/code/game/objects/items/weapons/storage/secure.dm @@ -186,8 +186,7 @@ syncuff.charge_detonated = TRUE sleep(3) explosion(get_turf(target), 0, 1, 3, 0) - qdel(casecuff) - casecuff = null + QDEL_NULL(casecuff) return canremove = 0 //can't drop the case cant_drop = 1 diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index d12e8f338ad..d9e59c0b671 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -690,17 +690,12 @@ /obj/item/weapon/storage/Destroy() close_all() if(boxes) - qdel(boxes) - boxes = null + QDEL_NULL(boxes) if(closer) - qdel(closer) - closer = null + QDEL_NULL(closer) if(xtra) - qdel(xtra) - xtra = null - for(var/atom/movable/AM in contents) - qdel(AM) - contents = null + QDEL_NULL(xtra) + QDEL_LIST_NULL(contents) ..() /obj/item/weapon/storage/preattack(atom/target, mob/user, adjacent, params) diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index 40dc3624baa..5e7f7ef62c4 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -31,8 +31,7 @@ /obj/item/weapon/melee/baton/Destroy() if (bcell) - qdel(bcell) - bcell = null + QDEL_NULL(bcell) return ..() diff --git a/code/game/objects/items/weapons/tanks/jetpack.dm b/code/game/objects/items/weapons/tanks/jetpack.dm index c685c9b4e4a..18141c5c509 100644 --- a/code/game/objects/items/weapons/tanks/jetpack.dm +++ b/code/game/objects/items/weapons/tanks/jetpack.dm @@ -45,8 +45,7 @@ if(allgases >= 0.005) return 1 - qdel(G) - G = null + QDEL_NULL(G) return /datum/action/item_action/toggle_jetpack diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm index 0ae6ebe9205..a8ed762ccbe 100644 --- a/code/game/objects/items/weapons/tanks/tanks.dm +++ b/code/game/objects/items/weapons/tanks/tanks.dm @@ -33,8 +33,7 @@ /obj/item/weapon/tank/Destroy() if(air_contents) - qdel(air_contents) - air_contents = null + QDEL_NULL(air_contents) if(istype(loc, /obj/machinery/portable_atmospherics)) var/obj/machinery/portable_atmospherics/holder = loc diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm index d67795932cd..4f268ba4a7c 100644 --- a/code/game/objects/items/weapons/twohanded.dm +++ b/code/game/objects/items/weapons/twohanded.dm @@ -104,8 +104,7 @@ var/obj/structure/window/W = A W.shatter() else - qdel(A) - A = null + QDEL_NULL(A) /obj/item/weapon/fireaxe/attackby(obj/item/I, mob/user) if(istype(I,/obj/item/tool/crowbar/halligan)) diff --git a/code/game/objects/items/weapons/weaponry.dm b/code/game/objects/items/weapons/weaponry.dm index 169cd1e6e2e..d488b37e6b6 100644 --- a/code/game/objects/items/weapons/weaponry.dm +++ b/code/game/objects/items/weapons/weaponry.dm @@ -182,8 +182,7 @@ user.visible_message("[user] creates a spear with \a [I] and \a [src]!",\ "You fasten \the [I] to the top of \the [src], creating \a [S].") - qdel(I) - I = null + QDEL_NULL(I) qdel(src) else if(I.is_wirecutter(user)) @@ -371,8 +370,7 @@ for(var/i in blades) var/blade = blades[i] blades.Remove(i) - qdel(blade) - blade = null + QDEL_NULL(blade) ..() /obj/item/weapon/macuahuitl/proc/get_current_blade_count() diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index a906f3ab497..0bf02c1d1dd 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -115,8 +115,7 @@ var/global/list/reagents_to_log = list(FUEL, PLASMA, PACID, SACID, AMUTATIONTOXI processing_objects -= src if(integratedpai) - qdel(integratedpai) - integratedpai = null + QDEL_NULL(integratedpai) material_type = null //Don't qdel, they're held globally if(associated_forward) @@ -240,8 +239,7 @@ var/global/list/reagents_to_log = list(FUEL, PLASMA, PACID, SACID, AMUTATIONTOXI verbs -= /obj/proc/remove_pai var/obj/item/device/paicard/P = integratedpai integratedpai = null - qdel(pAImove_delayer) - pAImove_delayer = null + QDEL_NULL(pAImove_delayer) return P return 0 @@ -940,4 +938,4 @@ a { if (R.id == FROSTOIL) display_name = "Coldsauce" dat += {"[display_name]: [R.volume] unit\s
"} - return dat \ No newline at end of file + return dat diff --git a/code/game/objects/storage/coat.dm b/code/game/objects/storage/coat.dm index 251a78e3f9c..430e047c925 100644 --- a/code/game/objects/storage/coat.dm +++ b/code/game/objects/storage/coat.dm @@ -21,8 +21,7 @@ /obj/item/clothing/suit/storage/Destroy() if(hold) - qdel(hold) - hold = null + QDEL_NULL(hold) return ..() /obj/item/clothing/suit/storage/can_quick_store(var/obj/item/I) diff --git a/code/game/objects/structures/ancient_cryopod.dm b/code/game/objects/structures/ancient_cryopod.dm index 5b634f689bb..4c9995807db 100644 --- a/code/game/objects/structures/ancient_cryopod.dm +++ b/code/game/objects/structures/ancient_cryopod.dm @@ -53,8 +53,7 @@ /obj/machinery/cryopod/proc/recruiter_recruited(mob/dead/observer/player, controls) if(player) - qdel(recruiter) - recruiter = null + QDEL_NULL(recruiter) visible_message("\The [name] opens with a hiss of frigid air!") playsound(src, 'sound/machines/pressurehiss.ogg', 30, 1) icon_state = "ancientpod_used" diff --git a/code/game/objects/structures/barsign.dm b/code/game/objects/structures/barsign.dm index cd848428abe..a5e2d944c40 100644 --- a/code/game/objects/structures/barsign.dm +++ b/code/game/objects/structures/barsign.dm @@ -90,8 +90,7 @@ var/list/barsigns = list() if(viscon) vis_contents -= viscon viscon.filters = null - qdel(viscon) - viscon = null + QDEL_NULL(viscon) current_preview = null if(interval_mode) processing_objects -= src diff --git a/code/game/objects/structures/bedsheet_bin.dm b/code/game/objects/structures/bedsheet_bin.dm index 763aa0f14db..d471126931b 100644 --- a/code/game/objects/structures/bedsheet_bin.dm +++ b/code/game/objects/structures/bedsheet_bin.dm @@ -134,8 +134,7 @@ LINEN BINS qdel(sheet) sheets.Cut() if(hidden) - qdel(hidden) - hidden = null + QDEL_NULL(hidden) ..() diff --git a/code/game/objects/structures/crates_lockers/closets/gimmick.dm b/code/game/objects/structures/crates_lockers/closets/gimmick.dm index 5a5f30fe224..b1376d7ac96 100644 --- a/code/game/objects/structures/crates_lockers/closets/gimmick.dm +++ b/code/game/objects/structures/crates_lockers/closets/gimmick.dm @@ -36,8 +36,7 @@ /obj/structure/closet/cabinet/snow/Destroy() ..() - qdel(hanger_rail) - hanger_rail = null + QDEL_NULL(hanger_rail) /obj/structure/hanger_rail icon = 'icons/obj/closet.dmi' diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index 8931c1af1cc..127900e600c 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -655,8 +655,7 @@ if(user.drop_item(W)) to_chat(user, "You rig [src].") - qdel(W) - W = null + QDEL_NULL(W) rigged = 1 return else if(istype(W, /obj/item/device/radio/electropack)) diff --git a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm index bcd8646db15..36094167c5d 100644 --- a/code/game/objects/structures/displaycase.dm +++ b/code/game/objects/structures/displaycase.dm @@ -24,8 +24,7 @@ /obj/structure/displaycase/Destroy() ..() if(circuit) - qdel(circuit) - circuit = null + QDEL_NULL(circuit) dump() /obj/structure/displaycase/proc/setContent() diff --git a/code/game/objects/structures/gravpult.dm b/code/game/objects/structures/gravpult.dm index f7840d650a5..30f5eae1ecb 100644 --- a/code/game/objects/structures/gravpult.dm +++ b/code/game/objects/structures/gravpult.dm @@ -191,8 +191,7 @@ var/list/gravpults = list() /obj/structure/deathsquad_gravpult/proc/hud_off() if (user) - qdel(button_launch) - button_launch = null + QDEL_NULL(button_launch) user.client.screen -= button_launch user.hud_used.holomap_obj.mouse_opacity = 0 user.client.images -= holomap_images diff --git a/code/game/objects/structures/inflatable.dm b/code/game/objects/structures/inflatable.dm index 152116041a9..7e0942aef49 100644 --- a/code/game/objects/structures/inflatable.dm +++ b/code/game/objects/structures/inflatable.dm @@ -385,8 +385,7 @@ /obj/structure/inflatable/shelter/Destroy() for(var/atom/movable/AM in src) AM.forceMove(loc) - qdel(cabin_air) - cabin_air = null + QDEL_NULL(cabin_air) ..() /obj/structure/inflatable/shelter/remove_air(amount) diff --git a/code/game/objects/structures/kitchen_spike.dm b/code/game/objects/structures/kitchen_spike.dm index 14a7dfb7326..c1c7e043ed9 100644 --- a/code/game/objects/structures/kitchen_spike.dm +++ b/code/game/objects/structures/kitchen_spike.dm @@ -101,8 +101,7 @@ /obj/structure/kitchenspike/proc/clean() icon_state = initial(icon_state) if(occupant) - qdel(occupant) - occupant = null + QDEL_NULL(occupant) /obj/structure/kitchenspike/suicide_act(var/mob/living/user) user.forceMove(get_turf(src)) diff --git a/code/game/objects/structures/mannequin.dm b/code/game/objects/structures/mannequin.dm index c9b5aecfb03..097f0858302 100644 --- a/code/game/objects/structures/mannequin.dm +++ b/code/game/objects/structures/mannequin.dm @@ -1469,8 +1469,7 @@ /datum/construction/mannequin_frame/custom_action(step, atom/used_atom, mob/user) user.visible_message("[user] has connected [used_atom] to [holder].", "You connect [used_atom] to [holder]") holder.overlays += image(holder.icon, used_atom.icon_state) - qdel (used_atom) - used_atom = null + QDEL_NULL (used_atom) return 1 /datum/construction/mannequin_frame/action(atom/used_atom,mob/user as mob) @@ -1548,8 +1547,7 @@ C.req_access = const_holder.req_access C.req_one_access = const_holder.req_one_access - qdel (holder) - holder = null + QDEL_NULL (holder) feedback_inc("cyber_mannequin_created",1) diff --git a/code/game/objects/structures/misc_structures.dm b/code/game/objects/structures/misc_structures.dm index ba85a9e231f..fa4eafc575c 100644 --- a/code/game/objects/structures/misc_structures.dm +++ b/code/game/objects/structures/misc_structures.dm @@ -53,14 +53,11 @@ /obj/structure/headpole/Destroy() if(head) - qdel(head) - head = null + QDEL_NULL(head) if(spear) - qdel(spear) - spear = null + QDEL_NULL(spear) if(display_head) - qdel(display_head) - display_head = null + QDEL_NULL(display_head) ..() /obj/structure/headpole/with_head/New(atom/A) diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index a37ee834901..732929efada 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -122,8 +122,7 @@ connected.icon_state = "morguet" connected.dir = src.dir else - qdel(connected) - connected = null + QDEL_NULL(connected) /obj/structure/morgue/proc/close_up() if(!connected) @@ -309,8 +308,7 @@ if (!( A.anchored )) A.forceMove(src) playsound(src, 'sound/items/Deconstruct.ogg', 50, 1) - qdel(src.connected) - src.connected = null + QDEL_NULL(src.connected) else if (src.locked == 0) playsound(src, 'sound/items/Deconstruct.ogg', 50, 1) src.connected = new /obj/structure/c_tray( src.loc ) @@ -323,8 +321,7 @@ A.forceMove(src.connected.loc) src.connected.icon_state = "cremat" else - qdel(src.connected) - src.connected = null + QDEL_NULL(src.connected) src.add_fingerprint(user) update() @@ -347,8 +344,7 @@ //Foreach goto(106) src.connected.icon_state = "cremat" else - qdel(src.connected) - src.connected = null + QDEL_NULL(src.connected) /obj/structure/crematorium/proc/cremate(mob/user) // for(var/obj/machinery/crema_switch/O in src) //trying to figure a way to call the switch, too drunk to sort it out atm @@ -391,8 +387,7 @@ //log_attack("\[[time_stamp()]\] [user]/[user.ckey] cremated [M]/[M.ckey]") M.death(1) M.ghostize() - qdel(M) - M = null + QDEL_NULL(M) for (var/obj/O in inside) //obj instead of obj/item so that bodybags and ashes get destroyed. We dont want tons and tons of ash piling up qdel(O) diff --git a/code/game/objects/structures/musician.dm b/code/game/objects/structures/musician.dm index fc31a6c2f74..a14b4731b2b 100644 --- a/code/game/objects/structures/musician.dm +++ b/code/game/objects/structures/musician.dm @@ -356,8 +356,7 @@ icon_state = "minimoog" /obj/structure/piano/Destroy() - qdel(song) - song = null + QDEL_NULL(song) ..() /obj/structure/piano/initialize() diff --git a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm index 1e720d6431b..9b2966d4db4 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/chairs.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/chairs.dm @@ -579,8 +579,7 @@ /obj/structure/bed/chair/folding/Destroy() if(folded) folded.unfolded = null - qdel(folded) - folded = null + QDEL_NULL(folded) ..() /obj/item/folding_chair @@ -603,8 +602,7 @@ /obj/item/folding_chair/Destroy() if(unfolded) unfolded.folded = null - qdel(unfolded) - unfolded = null + QDEL_NULL(unfolded) ..() /obj/item/folding_chair/attack(mob/living/M, mob/living/user, def_zone, originator) diff --git a/code/game/objects/structures/stool_bed_chair_nest/guillotine.dm b/code/game/objects/structures/stool_bed_chair_nest/guillotine.dm index 6075e6f1327..47a67793389 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/guillotine.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/guillotine.dm @@ -20,8 +20,7 @@ /obj/structure/bed/guillotine/Destroy() if(victim) - qdel(victim) - victim = null + QDEL_NULL(victim) ..() /obj/structure/bed/guillotine/update_icon() diff --git a/code/game/objects/structures/vehicles/adminbus.dm b/code/game/objects/structures/vehicles/adminbus.dm index c21937caf4a..23e20d4c169 100644 --- a/code/game/objects/structures/vehicles/adminbus.dm +++ b/code/game/objects/structures/vehicles/adminbus.dm @@ -86,12 +86,9 @@ if (busjuke) busjuke.disconnect_media_source() - qdel(busjuke) - busjuke = null - qdel(warp) - warp = null - qdel(lightsource) - lightsource = null + QDEL_NULL(busjuke) + QDEL_NULL(warp) + QDEL_NULL(lightsource) var/turf/T = get_turf(src) T.turf_animation('icons/effects/160x160.dmi',"busteleport",-WORLD_ICON_SIZE*2,-WORLD_ICON_SIZE,MOB_LAYER+1,'sound/effects/busteleport.ogg', anim_plane = EFFECTS_PLANE) diff --git a/code/game/objects/structures/vehicles/carts/datum_cart_network.dm b/code/game/objects/structures/vehicles/carts/datum_cart_network.dm index 4a4e508d466..3faf104ba15 100644 --- a/code/game/objects/structures/vehicles/carts/datum_cart_network.dm +++ b/code/game/objects/structures/vehicles/carts/datum_cart_network.dm @@ -33,8 +33,7 @@ for(var/obj/machinery/cart/C in merged_net.members) C.train_net = src members += C - qdel(merged_net) - merged_net = null + QDEL_NULL(merged_net) /datum/train/proc/train_rebuild(obj/machinery/cart/base) var/list/possible_expansions = list(base) diff --git a/code/game/objects/structures/vehicles/clowncart.dm b/code/game/objects/structures/vehicles/clowncart.dm index 51b9da426f3..bd3b8debcbd 100644 --- a/code/game/objects/structures/vehicles/clowncart.dm +++ b/code/game/objects/structures/vehicles/clowncart.dm @@ -177,8 +177,7 @@ playsound(src, 'sound/machines/ping.ogg', 50, 1) visible_message("You hear a ping as [src]'s SynthPeel Generator starts transforming banana juice into slippery peels.") playsound(src, 'sound/machines/ping.ogg', 50, 1) - qdel(W) - W = null + QDEL_NULL(W) else if(istype(W, /obj/item/toy/crayon/)) //Any crayon if(mode == MODE_DRAWING) printing_text = copytext(sanitize(lowertext(input(user, "Enter a message to print. Possible options: 'rune', 'graffiti', 'paint', 'nothing'", "Message", printing_text))),1,MAX_MESSAGE_LEN) diff --git a/code/game/objects/structures/vehicles/vehicle.dm b/code/game/objects/structures/vehicles/vehicle.dm index f2ae55811d1..b45053e43f7 100644 --- a/code/game/objects/structures/vehicles/vehicle.dm +++ b/code/game/objects/structures/vehicles/vehicle.dm @@ -105,8 +105,7 @@ mykey.paired_to = null mykey = null if(heldkey) - qdel(heldkey) - heldkey = null + QDEL_NULL(heldkey) ..() /obj/structure/bed/chair/vehicle/proc/set_keys() diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 43981a2ac82..f6756d310f7 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -318,8 +318,7 @@ /obj/machinery/shower/update_icon() //This is terribly unreadable, but basically it makes the shower mist up overlays.len = 0 //Once it's been on for a while, in addition to handling the water overlay. if(mymist) - qdel(mymist) - mymist = null + QDEL_NULL(mymist) if(on) var/image/water = image('icons/obj/watercloset.dmi', src, "water", BELOW_OBJ_LAYER, dir) @@ -340,8 +339,7 @@ mymist = new /obj/effect/mist(get_turf(src)) spawn(250) if(src && !on) - qdel(mymist) - mymist = null + QDEL_NULL(mymist) ismist = 0 /obj/machinery/shower/Crossed(atom/movable/O) diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 51533c1b265..7ab22493b75 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -474,8 +474,7 @@ var/list/one_way_windows relativewall() relativewall_neighbours() if(smartwindow) - qdel(smartwindow) - smartwindow = null + QDEL_NULL(smartwindow) if (opacity) smart_toggle() drop_stack(/obj/item/stack/light_w, get_turf(src), 1, user) @@ -502,8 +501,7 @@ var/list/one_way_windows relativewall() relativewall_neighbours() if(smartwindow) - qdel(smartwindow) - smartwindow = null + QDEL_NULL(smartwindow) if (opacity) smart_toggle() drop_stack(/obj/item/stack/light_w, get_turf(src), 1, user) diff --git a/code/game/striketeams/striketeam_datums.dm b/code/game/striketeams/striketeam_datums.dm index 7425e30a256..4fda995fe49 100644 --- a/code/game/striketeams/striketeam_datums.dm +++ b/code/game/striketeams/striketeam_datums.dm @@ -313,8 +313,7 @@ var/list/sent_strike_teams = list() for(var/x in all_hairs) var/datum/sprite_accessory/hair/H = new x // create new hair datum based on type x hairs.Add(H.name) // add hair name to hairs - qdel(H) // delete the hair after it's all done - H = null + QDEL_NULL(H) // delete the hair after it's all done //hair var/new_hstyle = input(user, "Select a hair style", "Grooming") as null|anything in hair_styles_list diff --git a/code/game/turfs/simulated/floor.dm b/code/game/turfs/simulated/floor.dm index 7ac800297f6..b15e939b1b7 100644 --- a/code/game/turfs/simulated/floor.dm +++ b/code/game/turfs/simulated/floor.dm @@ -387,8 +387,7 @@ var/global/list/turf/simulated/floor/phazontiles = list() //this proc. /turf/simulated/floor/proc/make_tiled_floor(var/obj/item/stack/tile/metal/T = null) if(floor_tile) - qdel(floor_tile) - floor_tile = null + QDEL_NULL(floor_tile) floor_tile = new T.type(null) material = floor_tile.material //Becomes a teleport destination for other phazon tiles diff --git a/code/game/turfs/simulated/floor_types.dm b/code/game/turfs/simulated/floor_types.dm index f6cc0d87bef..3ec20e50a27 100644 --- a/code/game/turfs/simulated/floor_types.dm +++ b/code/game/turfs/simulated/floor_types.dm @@ -130,8 +130,7 @@ var/obj/item/stack/tile/T = C if(T.use(1)) if(floor_tile) - qdel(floor_tile) - floor_tile = null + QDEL_NULL(floor_tile) floor_tile = new T.type(null) material = floor_tile.material intact = 1 diff --git a/code/game/turfs/simulated/walls_mineral.dm b/code/game/turfs/simulated/walls_mineral.dm index 00f01cec653..221d8cf29dd 100644 --- a/code/game/turfs/simulated/walls_mineral.dm +++ b/code/game/turfs/simulated/walls_mineral.dm @@ -174,8 +174,7 @@ for(var/obj/structure/falsewall/plasma/F in range(3,src))//Hackish as fuck, but until fire_act works, there is nothing I can do -Sieve var/turf/T = get_turf(F) T.ChangeTurf(/turf/simulated/wall/mineral/plasma/) - qdel (F) - F = null + QDEL_NULL (F) for(var/turf/simulated/wall/mineral/plasma/W in range(3,src)) W.ignite((temperature/4))//Added so that you can't set off a massive chain reaction with a small flame for(var/obj/machinery/door/airlock/plasma/D in range(3,src)) diff --git a/code/game/turfs/space/space.dm b/code/game/turfs/space/space.dm index 5b45b55a095..42f2cf8c2a1 100644 --- a/code/game/turfs/space/space.dm +++ b/code/game/turfs/space/space.dm @@ -98,8 +98,7 @@ A.loc.Entered(A) else if (src.x >= world.maxx) if(istype(A, /obj/item/projectile/meteor)) - qdel(A) - A = null + QDEL_NULL(A) return var/list/cur_pos = src.get_global_map_pos() @@ -125,8 +124,7 @@ A.loc.Entered(A) else if (src.y <= 1) if(istype(A, /obj/item/projectile/meteor)) - qdel(A) - A = null + QDEL_NULL(A) return var/list/cur_pos = src.get_global_map_pos() if(!cur_pos) @@ -152,8 +150,7 @@ else if (src.y >= world.maxy) if(istype(A, /obj/item/projectile/meteor)||istype(A, /obj/effect/space_dust)) - qdel(A) - A = null + QDEL_NULL(A) return var/list/cur_pos = src.get_global_map_pos() if(!cur_pos) diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 99d2513473c..faa6ebd5482 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -294,8 +294,7 @@ /turf/proc/RemoveLattice() var/obj/structure/lattice/L = locate(/obj/structure/lattice, src) if(L) - qdel (L) - L = null + QDEL_NULL (L) /turf/proc/add_dust() return @@ -349,8 +348,7 @@ if(F.material=="phazon") phazontiles -= src if(F.floor_tile) - qdel(F.floor_tile) - F.floor_tile = null + QDEL_NULL(F.floor_tile) F = null if(ispath(N, /turf/simulated/floor)) diff --git a/code/modules/RCD/schematic.dm b/code/modules/RCD/schematic.dm index be08fd9ce4d..effc8a5c03b 100644 --- a/code/modules/RCD/schematic.dm +++ b/code/modules/RCD/schematic.dm @@ -21,8 +21,7 @@ if(ourobj) for(var/client/C in clients) C.screen.Remove(ourobj) - qdel(ourobj) - ourobj = null + QDEL_NULL(ourobj) selected = null ..() diff --git a/code/modules/RCD/schematics/engi.dm b/code/modules/RCD/schematics/engi.dm index 84556797ee8..910e4ce6f23 100644 --- a/code/modules/RCD/schematics/engi.dm +++ b/code/modules/RCD/schematics/engi.dm @@ -216,8 +216,7 @@ /datum/rcd_schematic/con_airlock/Destroy() for(var/datum/selection_schematic/thing in schematics) - qdel(thing) - schematics = null + QDEL_NULL(thing) ..() /datum/rcd_schematic/con_airlock/select(var/mob/user, var/datum/rcd_schematic/old_schematic) @@ -488,8 +487,7 @@ /datum/rcd_schematic/con_window/Destroy() for(var/datum/selection_schematic/thing in schematics) - qdel(thing) - schematics = null + QDEL_NULL(thing) ..() /datum/rcd_schematic/con_window/select(var/mob/user, var/datum/rcd_schematic/old_schematic) @@ -559,8 +557,7 @@ /datum/selection_schematic/Destroy() for(var/client/C in clients) C.screen.Remove(ourobj) - qdel(ourobj) - ourobj = null + QDEL_NULL(ourobj) ..() /datum/selection_schematic/access_schematic diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 015bf425b38..b61e768af2d 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -5125,8 +5125,7 @@ message_admins("[key_name_admin(usr)] has deleted [capitalize(S.name)] ([S.type]). Objects and turfs [(killed_objs) ? "deleted" : "not deleted"].") log_admin("[key_name(usr)] has deleted [capitalize(S.name)]! Objects and turfs [(killed_objs) ? "deleted" : "not deleted"].") - qdel(S) - selected_shuttle = null + QDEL_NULL(S) shuttle_magic() //Update the window! diff --git a/code/modules/assembly/infrared.dm b/code/modules/assembly/infrared.dm index 0ae09f6073f..7533779a1c7 100644 --- a/code/modules/assembly/infrared.dm +++ b/code/modules/assembly/infrared.dm @@ -28,8 +28,7 @@ /obj/item/device/assembly/infra/Destroy(var/turf/loc) processing_objects.Remove(src) if (beam) - qdel(beam) - beam = null + QDEL_NULL(beam) ..() /obj/item/device/assembly/infra/examine(var/mob/user) @@ -51,8 +50,7 @@ process() else if (beam) - qdel(beam) - beam = null + QDEL_NULL(beam) processing_objects.Remove(src) playsound(T,'sound/weapons/egun_toggle_taser.ogg',70,0,-5) update_icon() @@ -63,8 +61,7 @@ if(!secured) on = FALSE if(beam) - qdel(beam) - beam = null + QDEL_NULL(beam) processing_objects.Remove(src) update_icon() return secured @@ -88,8 +85,7 @@ /obj/item/device/assembly/infra/process() if(!on) if (beam) - qdel(beam) - beam = null + QDEL_NULL(beam) return if(beam || !secured) return @@ -114,8 +110,7 @@ /obj/item/device/assembly/infra/attack_hand() if (beam) - qdel(beam) - beam = null + QDEL_NULL(beam) ..() @@ -124,8 +119,7 @@ ..() dir = t if (beam) - qdel(beam) - beam = null + QDEL_NULL(beam) /obj/item/device/assembly/infra/holder_movement() @@ -134,8 +128,7 @@ dir = holder.dir holder.update_icon() if (beam) - qdel(beam) - beam = null + QDEL_NULL(beam) return 1 @@ -190,8 +183,7 @@ dir = text2dir(choice) update_icon() if (beam) - qdel(beam) - beam = null + QDEL_NULL(beam) process() if(usr) diff --git a/code/modules/assembly/shock_kit.dm b/code/modules/assembly/shock_kit.dm index b8d27750651..cf4d4f2eb68 100644 --- a/code/modules/assembly/shock_kit.dm +++ b/code/modules/assembly/shock_kit.dm @@ -9,10 +9,8 @@ siemens_coefficient = 1 /obj/item/assembly/shock_kit/Destroy() - qdel(part1) - part1 = null - qdel(part2) - part2 = null + QDEL_NULL(part1) + QDEL_NULL(part2) ..() return diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index c85afe8e95c..5188a5e4524 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -270,8 +270,7 @@ var/const/MAX_SAVE_SLOTS = 16 for(var/entry in subsections) var/datum/preferences_subsection/prefs_ss = subsections[entry] if(prefs_ss && !prefs_ss.gcDestroyed) - qdel(prefs_ss) - subsections = null + QDEL_NULL(prefs_ss) ..() /datum/preferences/proc/try_load_save_sqlite(var/theckey, var/theclient, var/theslot) diff --git a/code/modules/clothing/accessories/storage.dm b/code/modules/clothing/accessories/storage.dm index 0f4dcb4430b..65a46cbe96a 100644 --- a/code/modules/clothing/accessories/storage.dm +++ b/code/modules/clothing/accessories/storage.dm @@ -45,8 +45,7 @@ /obj/item/clothing/accessory/storage/Destroy() if(hold) - qdel(hold) - hold = null + QDEL_NULL(hold) return ..() /obj/item/weapon/storage/internal @@ -89,14 +88,14 @@ icon_state = "vest_brown" _color = "vest_brown" storage_slots = 5 - + /obj/item/clothing/accessory/storage/fannypack name = "fanny pack" desc = "Extremely lame, but it's nice to have an extra pocket." icon_state = "fannypack" _color = "fannypack" storage_slots = 1 - + /obj/item/clothing/accessory/storage/fannypack/preloaded/assistant/New() ..() new /obj/item/clothing/accessory/assistantcard(hold) diff --git a/code/modules/clothing/accessories/wristwatch.dm b/code/modules/clothing/accessories/wristwatch.dm index 76235bd2948..7c5fc1c40fa 100644 --- a/code/modules/clothing/accessories/wristwatch.dm +++ b/code/modules/clothing/accessories/wristwatch.dm @@ -199,8 +199,7 @@ /obj/item/pocketwatch/luna_dial/Destroy() fall = null - qdel(caster) - caster = null + QDEL_NULL(caster) ..() /obj/item/pocketwatch/luna_dial/attack_self(var/mob/user) diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm index e6e6596a317..cdfefd014fa 100644 --- a/code/modules/clothing/glasses/glasses.dm +++ b/code/modules/clothing/glasses/glasses.dm @@ -681,8 +681,7 @@ var/list/science_goggles_wearers = list() /obj/item/clothing/glasses/emitter/proc/disable() if (beam) - qdel(beam) - beam = null + QDEL_NULL(beam) if (emitter) emitter.unregister_event(/event/before_move, src, /obj/item/clothing/glasses/emitter/proc/update_emitter_start) emitter.unregister_event(/event/after_move, src, /obj/item/clothing/glasses/emitter/proc/update_emitter_end) @@ -694,15 +693,13 @@ var/list/science_goggles_wearers = list() /obj/item/clothing/glasses/emitter/proc/update_emitter() if (!emitter || !isturf(emitter.loc)) if (beam) - qdel(beam) - beam = null + QDEL_NULL(beam) return if (ismob(emitter)) var/mob/M = emitter if (M.lying) if(beam) - qdel(beam) - beam = null + QDEL_NULL(beam) return if (!beam) beam = new /obj/effect/beam/emitter/eyes(emitter.loc) @@ -716,8 +713,7 @@ var/list/science_goggles_wearers = list() /obj/item/clothing/glasses/emitter/proc/update_emitter_start() if (beam) - qdel(beam) - beam = null + QDEL_NULL(beam) /obj/item/clothing/glasses/emitter/proc/update_emitter_end() if (!emitter || !isturf(emitter.loc)) diff --git a/code/modules/clothing/gloves/color.dm b/code/modules/clothing/gloves/color.dm index 479cf9b2b37..f7bc3a11975 100644 --- a/code/modules/clothing/gloves/color.dm +++ b/code/modules/clothing/gloves/color.dm @@ -131,8 +131,7 @@ /obj/item/clothing/gloves/black/thief/storage/Destroy() if(hold) - qdel(hold) - hold = null + QDEL_NULL(hold) return ..() /obj/item/clothing/gloves/black/thief/storage/attack_hand(mob/user) @@ -251,8 +250,7 @@ return if(current_gun) to_chat(M, "Your gun evaporates into thin air!") - qdel(current_gun) - current_gun = null + QDEL_NULL(current_gun) charging = TRUE spawn(50) charging = FALSE diff --git a/code/modules/clothing/gloves/miscellaneous.dm b/code/modules/clothing/gloves/miscellaneous.dm index 22342e1ec36..c95fb551e33 100644 --- a/code/modules/clothing/gloves/miscellaneous.dm +++ b/code/modules/clothing/gloves/miscellaneous.dm @@ -247,8 +247,7 @@ update_icon() /obj/item/clothing/gloves/powerfist/Destroy() - qdel(vial) - vial = null + QDEL_NULL(vial) ..() diff --git a/code/modules/clothing/spacesuits/rig.dm b/code/modules/clothing/spacesuits/rig.dm index f88a5b73eb1..5e0141826dc 100644 --- a/code/modules/clothing/spacesuits/rig.dm +++ b/code/modules/clothing/spacesuits/rig.dm @@ -192,9 +192,7 @@ var/list/all_hardsuit_pieces = list(HARDSUIT_HEADGEAR,HARDSUIT_GLOVES,HARDSUIT_B G = null T = null MB = null - for(var/obj/M in modules) - qdel(M) - modules = null + QDEL_LIST_NULL(modules) if(cell) qdel(cell) cell = null diff --git a/code/modules/clothing/suits/wintercoat.dm b/code/modules/clothing/suits/wintercoat.dm index dd36a9b5b5e..6cab61a2d9c 100644 --- a/code/modules/clothing/suits/wintercoat.dm +++ b/code/modules/clothing/suits/wintercoat.dm @@ -31,8 +31,7 @@ /obj/item/clothing/suit/storage/wintercoat/Destroy() if(hood) - qdel(hood) - hood = null + QDEL_NULL(hood) ..() /obj/item/clothing/head/winterhood diff --git a/code/modules/customitems/item_spawning.dm b/code/modules/customitems/item_spawning.dm index 8afe8ff60a3..a7f832f1dce 100644 --- a/code/modules/customitems/item_spawning.dm +++ b/code/modules/customitems/item_spawning.dm @@ -62,8 +62,7 @@ I.fingerprint_hash = C.fingerprint_hash //I.pin = C.pin //replace old ID - qdel(C) - C = null + QDEL_NULL(C) ok = M.equip_if_possible(I, slot_wear_id, 0) //if 1, last argument deletes on fail break // testing("Replaced ID!") diff --git a/code/modules/detectivework/detective_scanner.dm b/code/modules/detectivework/detective_scanner.dm index 3e814b460bd..5b41f13820d 100644 --- a/code/modules/detectivework/detective_scanner.dm +++ b/code/modules/detectivework/detective_scanner.dm @@ -26,8 +26,7 @@ else src.amount += W.amount //W = null - qdel(W) - W = null + QDEL_NULL(W) add_fingerprint(user) if (W) W.add_fingerprint(user) @@ -56,8 +55,7 @@ if ( !M.blood_DNA || !M.blood_DNA.len ) to_chat(user, "No blood found on [M]") if(M.blood_DNA) - qdel(M.blood_DNA) - M.blood_DNA = null + QDEL_NULL(M.blood_DNA) else to_chat(user, "Blood found on [M]. Analysing...") spawn(15) @@ -69,8 +67,7 @@ var/list/extracted_prints=list() if(!A.fingerprints || !A.fingerprints.len) if(A.fingerprints) - qdel(A.fingerprints) - A.fingerprints = null + QDEL_NULL(A.fingerprints) else for(var/i in A.fingerprints) extracted_prints[i]=A.fingerprints[i] @@ -341,8 +338,7 @@ //PRINTS if(!A.fingerprints || !A.fingerprints.len) if(A.fingerprints) - qdel(A.fingerprints) - A.fingerprints = null + QDEL_NULL(A.fingerprints) if(custom_finger.len) to_chat(user, "Isolated [custom_finger.len] fingerprints: Data Stored: Scan with Hi-Res Forensic Scanner to retrieve.") to_chat(user, "  Found [custom_finger.len] intact prints") diff --git a/code/modules/detectivework/detective_work.dm b/code/modules/detectivework/detective_work.dm index ac40a9d223c..1d2c432c36b 100644 --- a/code/modules/detectivework/detective_work.dm +++ b/code/modules/detectivework/detective_work.dm @@ -641,8 +641,7 @@ var/const/FINGERPRINT_COMPLETE = 6 //This is the output of the stringpercent(pri to_chat(usr, "The machinery finds it can complete a match.") else to_chat(usr, "No match found.") - qdel(card) - card = null + QDEL_NULL(card) else to_chat(usr, "ERROR: No prints/too many cards.") if(card.loc == src) diff --git a/code/modules/events/carp_migration.dm b/code/modules/events/carp_migration.dm index 365d71ec9ff..0b07fe0ceb1 100644 --- a/code/modules/events/carp_migration.dm +++ b/code/modules/events/carp_migration.dm @@ -26,5 +26,4 @@ if(!C.stat) var/turf/T = get_turf(C) if(istype(T, /turf/space)) - qdel(C) - C = null + QDEL_NULL(C) diff --git a/code/modules/events/heist.dm b/code/modules/events/heist.dm index b604506d308..656ff17ad1e 100644 --- a/code/modules/events/heist.dm +++ b/code/modules/events/heist.dm @@ -62,8 +62,7 @@ var/global/list/datum/mind/raiders = list() //Antags. for(var/obj/effect/landmark/L in landmarks_list) if(L.name == "voxstart") raider_spawn += get_turf(L) - qdel(L) - L = null + QDEL_NULL(L) continue //Generate objectives for the group. diff --git a/code/modules/food/cooking_machines.dm b/code/modules/food/cooking_machines.dm index 1fa7e3342cd..ce6c0616939 100644 --- a/code/modules/food/cooking_machines.dm +++ b/code/modules/food/cooking_machines.dm @@ -308,8 +308,7 @@ var/global/ingredientLimit = 10 H.stored_mob.ghostize() H.stored_mob.death() H.contents -= H.stored_mob - qdel(H.stored_mob) - H.stored_mob = null + QDEL_NULL(H.stored_mob) var/obj/item/I = ingredient var/obj/item/weapon/reagent_containers/food/new_food = new foodType(loc,I) @@ -443,8 +442,7 @@ var/global/ingredientLimit = 10 var/obj/item/itemIngredient = ingredient C.luckiness += itemIngredient.luckiness - qdel(ingredient) - ingredient = null + QDEL_NULL(ingredient) return @@ -803,8 +801,7 @@ var/global/ingredientLimit = 10 ..() /obj/machinery/oven/Destroy() - qdel(within) - within = null + QDEL_NULL(within) ..() /obj/machinery/oven/RefreshParts() diff --git a/code/modules/food/icecreamvat.dm b/code/modules/food/icecreamvat.dm index 612e9f5fe78..0dbb35eab55 100644 --- a/code/modules/food/icecreamvat.dm +++ b/code/modules/food/icecreamvat.dm @@ -31,12 +31,9 @@ ..() /obj/machinery/cooking/icemachine/Destroy() - qdel(reagents) - reagents = null - qdel(beaker) - beaker = null - qdel(to_add) - to_add = null + QDEL_NULL(reagents) + QDEL_NULL(beaker) + QDEL_NULL(to_add) ..() // Utilities /////////////////////////////////////////////////// diff --git a/code/modules/games/cards/wizard_cards.dm b/code/modules/games/cards/wizard_cards.dm index eead3ae497f..f390b455bf8 100644 --- a/code/modules/games/cards/wizard_cards.dm +++ b/code/modules/games/cards/wizard_cards.dm @@ -67,8 +67,7 @@ var/global/list/wizard_cards_normal = list( /obj/item/toy/singlecard/wizard/Destroy() if(card_use) - qdel(card_use) - card_use = null + QDEL_NULL(card_use) ..() /obj/item/toy/singlecard/wizard/update_icon() diff --git a/code/modules/games/cards_html.dm b/code/modules/games/cards_html.dm index 10c287352f8..79ffd80c2ed 100644 --- a/code/modules/games/cards_html.dm +++ b/code/modules/games/cards_html.dm @@ -60,8 +60,7 @@ for (var/datum/playingcard/P in H.cards) src.cards.Add(P) - qdel (O) - O = null + QDEL_NULL (O) user.show_message("You place your cards on the bottom of the deck.") else @@ -137,8 +136,7 @@ /obj/item/weapon/hand/Del() if (src.hi) - qdel (src.hi) - src.hi = null + QDEL_NULL (src.hi) return ..() diff --git a/code/modules/html_interface/map/interactive_map.dm b/code/modules/html_interface/map/interactive_map.dm index b6f77708daa..4969409f7d2 100644 --- a/code/modules/html_interface/map/interactive_map.dm +++ b/code/modules/html_interface/map/interactive_map.dm @@ -36,11 +36,7 @@ var/const/ALLOW_CENTCOMM = FALSE src.data = list() /datum/interactive_map/Destroy() - if (src.interfaces) - for (var/datum/html_interface/hi in interfaces) - qdel(hi) - src.interfaces = null - + QDEL_LIST_NULL(interfaces) return ..() //Override this to show the user the interface @@ -100,7 +96,7 @@ var/const/ALLOW_CENTCOMM = FALSE testing(fdel(last_git_hash_path)) text2file(current_git_hash, last_git_hash_path) - + testing("MINIMAP: All minimaps have been generated.") minimapinit = 1 // some idiot put HTML asset sending here. In a spawn. After a long wait for minimap generation. diff --git a/code/modules/html_interface/paintTool/custom_painting_datum.dm b/code/modules/html_interface/paintTool/custom_painting_datum.dm index 1e9debd3316..4229ff6fabc 100644 --- a/code/modules/html_interface/paintTool/custom_painting_datum.dm +++ b/code/modules/html_interface/paintTool/custom_painting_datum.dm @@ -133,11 +133,9 @@ ..() parent = null - qdel(interface) - interface = null + QDEL_NULL(interface) - qdel(mp_handler) - mp_handler = null + QDEL_NULL(mp_handler) /datum/custom_painting/proc/Copy() var/datum/custom_painting/copy = new(parent, bitmap_width, bitmap_height, offset_x, offset_y, base_color) diff --git a/code/modules/hydroponics/seed_machines.dm b/code/modules/hydroponics/seed_machines.dm index 9e2056761e2..91da281c556 100644 --- a/code/modules/hydroponics/seed_machines.dm +++ b/code/modules/hydroponics/seed_machines.dm @@ -282,8 +282,7 @@ if(loaded_seed && loaded_seed.seed) genetics = loaded_seed.seed - qdel(loaded_seed) - loaded_seed = null + QDEL_NULL(loaded_seed) if(href_list["get_gene"]) diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm index aae9333af9e..dd9e9610a4f 100644 --- a/code/modules/library/lib_machines.dm +++ b/code/modules/library/lib_machines.dm @@ -210,7 +210,6 @@ var/global/list/library_section_names = list("Fiction", "Non-Fiction", "Adult", b.name = "Print Job #[rand(100, 999)]" b.icon_state = "book[rand(1,9)]" b.item_state = b.icon_state - qdel(O) - O = null + QDEL_NULL(O) else return ..() diff --git a/code/modules/lighting/light_mob.dm b/code/modules/lighting/light_mob.dm index f1d9df7ab82..02a117eb681 100644 --- a/code/modules/lighting/light_mob.dm +++ b/code/modules/lighting/light_mob.dm @@ -8,18 +8,15 @@ if (dark_plane) client.screen -= dark_plane - qdel(dark_plane) - dark_plane = null + QDEL_NULL(dark_plane) if (master_plane) client.screen -= master_plane - qdel(master_plane) - master_plane = null + QDEL_NULL(master_plane) if (self_vision) client.screen -= self_vision - qdel(self_vision) - self_vision = null + QDEL_NULL(self_vision) dark_plane = new(client) master_plane = new(client) @@ -32,4 +29,4 @@ if(seedarkness) master_plane?.color = LIGHTING_PLANEMASTER_COLOR else - master_plane?.color = "" \ No newline at end of file + master_plane?.color = "" diff --git a/code/modules/liquid/splash_simulation.dm b/code/modules/liquid/splash_simulation.dm index dd8d9c241bf..c6b97e61ee6 100644 --- a/code/modules/liquid/splash_simulation.dm +++ b/code/modules/liquid/splash_simulation.dm @@ -25,8 +25,7 @@ var/list/datum/puddle/puddles = list() /datum/puddle/Del() puddles -= src for(var/obj/O in liquid_objects) - qdel(O) - O = null + QDEL_NULL(O) ..() /client/proc/splash() @@ -74,8 +73,7 @@ var/list/datum/puddle/puddles = list() for( var/obj/effect/liquid/L in loc ) if(L != src) - qdel(L) - L = null + QDEL_NULL(L) /obj/effect/liquid/proc/spread() diff --git a/code/modules/media/broadcast/transmitters/broadcast.dm b/code/modules/media/broadcast/transmitters/broadcast.dm index 2eb7a04a6b7..445b6add2f4 100644 --- a/code/modules/media/broadcast/transmitters/broadcast.dm +++ b/code/modules/media/broadcast/transmitters/broadcast.dm @@ -34,11 +34,9 @@ /obj/machinery/media/transmitter/broadcast/Destroy() if(wires) - qdel(wires) - wires = null + QDEL_NULL(wires) if(power_connection) - qdel(power_connection) - power_connection = null + QDEL_NULL(power_connection) . = ..() /obj/machinery/media/transmitter/broadcast/proc/cable_power_change(var/list/args) diff --git a/code/modules/media/jukebox.dm b/code/modules/media/jukebox.dm index e6b37b4e57d..d9a7d07e327 100644 --- a/code/modules/media/jukebox.dm +++ b/code/modules/media/jukebox.dm @@ -221,8 +221,7 @@ var/global/list/loopModeNames=list( /obj/machinery/media/jukebox/Destroy() if(wires) - qdel(wires) - wires = null + QDEL_NULL(wires) ..() /obj/machinery/media/jukebox/attack_paw(var/mob/user) diff --git a/code/modules/medical/computer/cloning.dm b/code/modules/medical/computer/cloning.dm index 6e277d1cebb..6268c7382d5 100644 --- a/code/modules/medical/computer/cloning.dm +++ b/code/modules/medical/computer/cloning.dm @@ -262,8 +262,7 @@ src.active_record = locate(href_list["view_rec"]) if(istype(src.active_record,/datum/dna2/record)) if ((isnull(src.active_record.ckey))) - qdel(src.active_record) - src.active_record = null + QDEL_NULL(src.active_record) src.temp = "ERROR: Record Corrupt" else src.menu = 3 @@ -283,8 +282,7 @@ if (istype(C)||istype(C, /obj/item/device/pda)) if(src.check_access(C)) src.records.Remove(src.active_record) - qdel(src.active_record) - src.active_record = null + QDEL_NULL(src.active_record) src.temp = "Record deleted." src.menu = 2 else @@ -358,8 +356,7 @@ if(success) temp = "Initiating cloning cycle..." records.Remove(C) - qdel(C) - C = null + QDEL_NULL(C) menu = 1 else //if growclone() failed, we can't clone the guy, so what is this even DOING here? diff --git a/code/modules/mining/machine_base.dm b/code/modules/mining/machine_base.dm index 493727a0e20..26f9e4963cc 100644 --- a/code/modules/mining/machine_base.dm +++ b/code/modules/mining/machine_base.dm @@ -21,8 +21,7 @@ initialize() /obj/machinery/mineral/Destroy() - qdel(mover) - mover = null + QDEL_NULL(mover) . = ..() /obj/machinery/mineral/stacking_machine/initialize() diff --git a/code/modules/mining/machine_unloading.dm b/code/modules/mining/machine_unloading.dm index 507a67baf88..5ec90da1c48 100644 --- a/code/modules/mining/machine_unloading.dm +++ b/code/modules/mining/machine_unloading.dm @@ -103,8 +103,7 @@ /obj/effect/unloader_grabber/Destroy() if (stack_of_items) - qdel(stack_of_items) - stack_of_items = null + QDEL_NULL(stack_of_items) unloader = null if (loc) for (var/atom/movable/AM in contents) diff --git a/code/modules/mining/ores_coins.dm b/code/modules/mining/ores_coins.dm index f1dd67a637a..4d666921760 100644 --- a/code/modules/mining/ores_coins.dm +++ b/code/modules/mining/ores_coins.dm @@ -523,8 +523,7 @@ if(CC.amount <= 0) to_chat(user, "This cable coil appears to be empty.") - qdel(CC) - CC = null + QDEL_NULL(CC) return overlays += image('icons/obj/items.dmi',"coin_string_overlay") diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 2f41ee813e0..f81cf85f9d8 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -127,8 +127,7 @@ var/creating_arena = FALSE /mob/dead/observer/Destroy() ..() - qdel(station_holomap) - station_holomap = null + QDEL_NULL(station_holomap) ghostMulti = null observers.Remove(src) diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm index 81330b98bb8..26525d71af6 100644 --- a/code/modules/mob/inventory.dm +++ b/code/modules/mob/inventory.dm @@ -549,8 +549,7 @@ else switch(act_on_fail) if(EQUIP_FAILACTION_DELETE) - qdel(W) - W = null + QDEL_NULL(W) if(EQUIP_FAILACTION_DROP) W.forceMove(get_turf(src)) // I think. return equipped diff --git a/code/modules/mob/living/carbon/brain/MMI.dm b/code/modules/mob/living/carbon/brain/MMI.dm index 5f886368a4c..75b7a9da308 100644 --- a/code/modules/mob/living/carbon/brain/MMI.dm +++ b/code/modules/mob/living/carbon/brain/MMI.dm @@ -33,8 +33,7 @@ /obj/item/device/mmi/Destroy() if(brainmob) - qdel(brainmob) - brainmob = null + QDEL_NULL(brainmob) ..() // Return true if handled @@ -46,8 +45,7 @@ if(ccYou're short [req-cc] [temppart]\s.
") - qdel(temppart) - temppart = null + QDEL_NULL(temppart) return TRUE if(!istype(loc,/turf)) to_chat(user, "You can't assemble the MoMMI, \the [src] has to be standing on the ground (or a table) to be perfectly precise.") @@ -183,8 +181,7 @@ brainmob.stat = 0 brainmob.resurrect() - qdel(O) - O = null + QDEL_NULL(O) name = "[initial(name)]: [brainmob.real_name]" icon_state = "mmi_full" @@ -222,8 +219,7 @@ to_chat(user, "You upend \the [src], spilling the brain onto the floor.") var/obj/item/organ/internal/brain/brain = new(user.loc) brain.transfer_identity(brainmob) - qdel(brainmob) - brainmob = null//Set mmi brainmob var to null + QDEL_NULL(brainmob)//Set mmi brainmob var to null icon_state = "mmi_empty" name = initial(name) @@ -275,8 +271,7 @@ /obj/item/device/mmi/radio_enabled/Destroy() ..() - qdel(radio) - radio = null + QDEL_NULL(radio) /obj/item/device/mmi/radio_enabled/verb/Toggle_Broadcasting() set name = "Toggle Broadcasting" diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index ca38951773f..c906d4f8cee 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -76,12 +76,10 @@ to_chat(shade, "Dark energies rip your dying body appart, anchoring your soul inside the form of a Shade. You retain your memories, and devotion to the cult.") if(species) - qdel(species) - species = null + QDEL_NULL(species) if(vessel) - qdel(vessel) - vessel = null + QDEL_NULL(vessel) my_appearance = null diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 0edb6cf0447..40c33538612 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -256,8 +256,7 @@ if (internal) if (!internal.air_contents) - qdel(internal) - internal = null + QDEL_NULL(internal) else stat("Internal Atmosphere Info", internal.name) stat("Tank Pressure", internal.air_contents.return_pressure()) diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index 2bbe9ed23ed..bd11ed5b0b2 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -96,8 +96,7 @@ switch (act_on_fail) if(EQUIP_FAILACTION_DELETE) - qdel(W) - W = null + QDEL_NULL(W) if(EQUIP_FAILACTION_DROP) W.forceMove(get_turf(src)) // I think. return null @@ -358,8 +357,7 @@ if(CANNOT_EQUIP) switch(act_on_fail) if(EQUIP_FAILACTION_DELETE) - qdel(W) - W = null + QDEL_NULL(W) if(EQUIP_FAILACTION_DROP) W.forceMove(get_turf(src)) //Should this be using drop_from_inventory instead? else diff --git a/code/modules/mob/living/carbon/slime/slime.dm b/code/modules/mob/living/carbon/slime/slime.dm index 61d0f43a41c..a292c2c70f3 100644 --- a/code/modules/mob/living/carbon/slime/slime.dm +++ b/code/modules/mob/living/carbon/slime/slime.dm @@ -690,8 +690,7 @@ to_chat(user, "You feed \the [M] the potion, removing its powers and calming it.") if(M.mind) M.mind.transfer_to(pet) - qdel (M) - M = null + QDEL_NULL (M) var/newname = "" if(pet.client)//leaving the player-controlled slimes the ability to choose their new name newname = copytext(sanitize(input(pet, "You have been fed a docility potion, what shall we call you?", "Give yourself a new name", "pet slime") as null|text),1,MAX_NAME_LEN) @@ -726,8 +725,7 @@ to_chat(user, "You feed \the [M] the potion, removing its powers and calming it.") if(M.mind) M.mind.transfer_to(pet) - qdel (M) - M = null + QDEL_NULL (M) var/newname = "" if(pet.client)//leaving the player-controlled slimes the ability to choose their new name newname = copytext(sanitize(input(pet, "You have been fed an advanced docility potion, what shall we call you?", "Give yourself a new name", "pet slime") as null|text),1,MAX_NAME_LEN) diff --git a/code/modules/mob/living/combat.dm b/code/modules/mob/living/combat.dm index 7eb1f365d3b..3634488f97e 100644 --- a/code/modules/mob/living/combat.dm +++ b/code/modules/mob/living/combat.dm @@ -39,8 +39,7 @@ if(G.affecting) visible_message("[src] has broken [target]'s grip on [G.affecting]!") spawn(1) - qdel(G) - G = null + QDEL_NULL(G) . = TRUE diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 0b116245b61..5da4e3ed496 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -19,16 +19,13 @@ if(butchering_drops) for(var/datum/butchering_product/B in butchering_drops) butchering_drops -= B - qdel(B) - B = null + QDEL_NULL(B) if(immune_system) - qdel(immune_system) - immune_system = null + QDEL_NULL(immune_system) if(addicted_chems) - qdel(addicted_chems) - addicted_chems = null + QDEL_NULL(addicted_chems) . = ..() /mob/living/examine(var/mob/user, var/size = "", var/show_name = TRUE, var/show_icon = TRUE) //Show the mob's size and whether it's been butchered @@ -586,8 +583,7 @@ Thanks. if(istype(s)) O.implants -= s H.contents -= s - qdel(s) - s = null + QDEL_NULL(s) O.amputated = 0 O.brute_dam = 0 O.burn_dam = 0 @@ -826,8 +822,7 @@ Thanks. if(istype(H.loc, /mob/living)) var/mob/living/Location = H.loc Location.drop_from_inventory(H) - qdel(H) - H = null + QDEL_NULL(H) return else if(istype(src.loc, /obj/structure/strange_present)) var/obj/structure/strange_present/present = src.loc @@ -914,8 +909,7 @@ Thanks. var/resisting = 0 for(var/obj/O in L.requests) L.requests.Remove(O) - qdel(O) - O = null + QDEL_NULL(O) resisting++ for(var/obj/item/weapon/grab/G in usr.grabbed_by) resisting++ diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index d7bb4fb5eef..b29cdd2b1a4 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -769,8 +769,7 @@ var/list/ai_list = list() ) input = input("Please select a hologram:") as null|anything in icon_list if(input) - qdel(holo_icon) - holo_icon = null + QDEL_NULL(holo_icon) switch(input) if("Default") holo_icon = getHologramIcon(icon('icons/mob/AI.dmi',"holo1")) diff --git a/code/modules/mob/living/silicon/ai/freelook/chunk.dm b/code/modules/mob/living/silicon/ai/freelook/chunk.dm index fff504208ef..6de422d94f7 100644 --- a/code/modules/mob/living/silicon/ai/freelook/chunk.dm +++ b/code/modules/mob/living/silicon/ai/freelook/chunk.dm @@ -109,8 +109,7 @@ continue if(m.ai.client) m.ai.client.images -= t.obscured - qdel(t.obscured) - t.obscured = null + QDEL_NULL(t.obscured) for(var/turf in visRemoved) var/turf/t = turf diff --git a/code/modules/mob/living/silicon/ai/freelook/eye.dm b/code/modules/mob/living/silicon/ai/freelook/eye.dm index 99db8b80e20..f64c8c4c864 100644 --- a/code/modules/mob/living/silicon/ai/freelook/eye.dm +++ b/code/modules/mob/living/silicon/ai/freelook/eye.dm @@ -89,8 +89,7 @@ /mob/living/silicon/ai/Destroy() if(eyeobj) eyeobj.ai = null - qdel(eyeobj) // No AI, no Eye - eyeobj = null + QDEL_NULL(eyeobj) // No AI, no Eye ..() /atom/proc/move_camera_by_click() @@ -110,7 +109,7 @@ var/initial = initial(user.sprint) var/max_sprint = 50 - var/obj/machinery/turret/T = user.current + var/obj/machinery/turret/T = user.current var/obj/machinery/hologram/holopad/H = user.current if(istype(T)) @@ -123,7 +122,7 @@ CAN_MOVE_DIAGONALLY = FALSE user.eyeobj.glide_size = DELAY2GLIDESIZE(1) user.delayNextMove(1) - else + else user.eyeobj.glide_size = WORLD_ICON_SIZE CAN_MOVE_DIAGONALLY = TRUE diff --git a/code/modules/mob/living/silicon/pai/death.dm b/code/modules/mob/living/silicon/pai/death.dm index eecd07a4560..5cde06a4ee2 100644 --- a/code/modules/mob/living/silicon/pai/death.dm +++ b/code/modules/mob/living/silicon/pai/death.dm @@ -17,11 +17,9 @@ mind = null living_mob_list -= src if(pps_device) - qdel(pps_device) - pps_device = null + QDEL_NULL(pps_device) if(holomap_device) holomap_device.stopWatching() - qdel(holomap_device) - holomap_device = null + QDEL_NULL(holomap_device) ghostize() qdel(src) diff --git a/code/modules/mob/living/silicon/robot/death.dm b/code/modules/mob/living/silicon/robot/death.dm index 269dadc9866..8eab3f7d88c 100644 --- a/code/modules/mob/living/silicon/robot/death.dm +++ b/code/modules/mob/living/silicon/robot/death.dm @@ -33,8 +33,7 @@ anim(target = src, a_icon = 'icons/mob/mob.dmi', flick_anim = "dust-r", sleeptime = 15) new /obj/effect/decal/remains/robot(loc) if(mmi) - qdel(mmi) //Delete the MMI first so that it won't go popping out. - mmi = null + QDEL_NULL(mmi) //Delete the MMI first so that it won't go popping out. dead_mob_list -= src qdel(src) diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm index afe054965ab..83bb083a703 100644 --- a/code/modules/mob/living/silicon/robot/life.dm +++ b/code/modules/mob/living/silicon/robot/life.dm @@ -227,6 +227,5 @@ to_chat(src, "Your hardware detects that you have left your intended location. Initiating self-destruct.") spawn(rand(2,7) SECONDS) if(mmi) //no sneaking brains away - qdel(mmi) - mmi = null + QDEL_NULL(mmi) gib() diff --git a/code/modules/mob/living/silicon/robot/robot_modules.dm b/code/modules/mob/living/silicon/robot/robot_modules.dm index 4321da3284e..c586ebbc71a 100644 --- a/code/modules/mob/living/silicon/robot/robot_modules.dm +++ b/code/modules/mob/living/silicon/robot/robot_modules.dm @@ -53,14 +53,10 @@ qdel(A) modules = null if(emag) - qdel(emag) - emag = null + QDEL_NULL(emag) if(jetpack) - qdel(jetpack) - jetpack = null - for(var/obj/A in upgrades) - qdel(upgrades) - upgrades = null + QDEL_NULL(jetpack) + QDEL_LIST_NULL(upgrades) ..() /obj/item/weapon/robot_module/proc/on_emag() diff --git a/code/modules/mob/living/simple_animal/borer/egg.dm b/code/modules/mob/living/simple_animal/borer/egg.dm index 22e0bab70db..d24004c892a 100644 --- a/code/modules/mob/living/simple_animal/borer/egg.dm +++ b/code/modules/mob/living/simple_animal/borer/egg.dm @@ -109,8 +109,7 @@ to_chat(O, "The egg is recovering. Try again in a few moments.") /obj/item/weapon/reagent_containers/food/snacks/borer_egg/Destroy() - qdel(recruiter) - recruiter = null + QDEL_NULL(recruiter) ..() /obj/item/weapon/reagent_containers/food/snacks/borer_egg/defected diff --git a/code/modules/mob/living/simple_animal/grue_egg.dm b/code/modules/mob/living/simple_animal/grue_egg.dm index 3523b722371..4ce6bcbcf13 100644 --- a/code/modules/mob/living/simple_animal/grue_egg.dm +++ b/code/modules/mob/living/simple_animal/grue_egg.dm @@ -62,8 +62,7 @@ name = "grue egg remnants" desc = "The remnants of a grue egg." gender = "plural" - qdel(recruiter) - recruiter = null + QDEL_NULL(recruiter) ..() // Amount of time between retries for recruits. As to not spam ghosts every minute. @@ -132,4 +131,4 @@ spawn (GRUE_EGG_RERECRUIT_DELAY) Grow() // Reset egg, check for hatchability. -#undef GRUE_EGG_RERECRUIT_DELAY \ No newline at end of file +#undef GRUE_EGG_RERECRUIT_DELAY diff --git a/code/modules/mob/living/simple_animal/hostile/hive_aliens.dm b/code/modules/mob/living/simple_animal/hostile/hive_aliens.dm index 980bda60b74..9baf95aa155 100644 --- a/code/modules/mob/living/simple_animal/hostile/hive_aliens.dm +++ b/code/modules/mob/living/simple_animal/hostile/hive_aliens.dm @@ -138,8 +138,7 @@ flick("hive_artificer_dying", src) if(summoned_spikes) - qdel(summoned_spikes) - summoned_spikes = null + QDEL_NULL(summoned_spikes) /mob/living/simple_animal/hostile/hive_alien/constructor/Move(NewLoc, Dir = 0, step_x = 0, step_y = 0, glide_size_override = 0) .=..() diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index b93f7ea9391..571b9c353cf 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -42,9 +42,7 @@ initialize_rules() /mob/living/simple_animal/hostile/Destroy() - for(var/datum/fuzzy_ruling/D in target_rules) - qdel(D) - target_rules = null + QDEL_LIST_NULL(target_rules) if(hivelord) if(src in hivelord.broods) hivelord.broods.Remove(src) diff --git a/code/modules/mob/living/simple_animal/hostile/human/halloween.dm b/code/modules/mob/living/simple_animal/hostile/human/halloween.dm index 315147d1c88..7a0623084bc 100644 --- a/code/modules/mob/living/simple_animal/hostile/human/halloween.dm +++ b/code/modules/mob/living/simple_animal/hostile/human/halloween.dm @@ -476,8 +476,7 @@ /mob/living/simple_animal/hostile/syphoner/Destroy() if(power_connection) - qdel(power_connection) - power_connection = null + QDEL_NULL(power_connection) . = ..() /mob/living/simple_animal/hostile/syphoner/get_cell() diff --git a/code/modules/mob/living/simple_animal/hostile/human/nazi.dm b/code/modules/mob/living/simple_animal/hostile/human/nazi.dm index 821ee14f83f..456ffd0ae61 100644 --- a/code/modules/mob/living/simple_animal/hostile/human/nazi.dm +++ b/code/modules/mob/living/simple_animal/hostile/human/nazi.dm @@ -84,8 +84,7 @@ /mob/living/simple_animal/hostile/humanoid/nazi/proc/droploot() var/obj/item/weapon/gun/projectile/luger/dropgun = new(loc) if(!ammo) - qdel(dropgun.chambered) - dropgun.chambered = null + QDEL_NULL(dropgun.chambered) qdel(dropgun.stored_magazine) else ammo-- diff --git a/code/modules/mob/living/simple_animal/hostile/mushroom.dm b/code/modules/mob/living/simple_animal/hostile/mushroom.dm index 11eb94db8d6..bea1f77fc16 100644 --- a/code/modules/mob/living/simple_animal/hostile/mushroom.dm +++ b/code/modules/mob/living/simple_animal/hostile/mushroom.dm @@ -131,8 +131,7 @@ if(istype(I, /obj/item/weapon/reagent_containers/food/snacks/grown/mushroom)) if(stat == DEAD && !recovery_cooldown) Recover() - qdel(I) - I = null + QDEL_NULL(I) else to_chat(user, "[src] won't eat it!") return diff --git a/code/modules/mob/living/simple_animal/hostile/necro.dm b/code/modules/mob/living/simple_animal/hostile/necro.dm index eeddfa4df57..50baf28de21 100644 --- a/code/modules/mob/living/simple_animal/hostile/necro.dm +++ b/code/modules/mob/living/simple_animal/hostile/necro.dm @@ -371,8 +371,7 @@ /mob/living/simple_animal/hostile/necro/zombie/turned/Destroy() if(host) - qdel(host) - host = null + QDEL_NULL(host) ..() /mob/living/simple_animal/hostile/necro/zombie/turned/attackby(var/obj/item/weapon/W, var/mob/user) @@ -687,8 +686,7 @@ /mob/living/simple_animal/hostile/necro/zombie/headcrab/Destroy() if(host) - qdel(host) - host = null + QDEL_NULL(host) ..() /mob/living/simple_animal/hostile/necro/zombie/headcrab/death(var/gibbed = FALSE) @@ -898,4 +896,4 @@ ranged_message = "pukes" melee_damage_lower = 10 - melee_damage_upper = 15 \ No newline at end of file + melee_damage_upper = 15 diff --git a/code/modules/mob/living/simple_animal/hostile/pulse_demon/pulsedemon_attack.dm b/code/modules/mob/living/simple_animal/hostile/pulse_demon/pulsedemon_attack.dm index 49a6bbcfc85..f3c079f2f79 100644 --- a/code/modules/mob/living/simple_animal/hostile/pulse_demon/pulsedemon_attack.dm +++ b/code/modules/mob/living/simple_animal/hostile/pulse_demon/pulsedemon_attack.dm @@ -302,8 +302,7 @@ if(user.current_bot) user.current_bot.PD_occupant = null if(user.current_bot.pAImove_delayer && !user.current_bot.integratedpai) - qdel(user.current_bot.pAImove_delayer) - user.current_bot.pAImove_delayer = null + QDEL_NULL(user.current_bot.pAImove_delayer) user.current_robot = null user.current_bot = null user.current_weapon = null diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index 6a39eaef1b7..2d315b5a272 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -810,8 +810,7 @@ //parrots will eat crackers instead of dropping them if(istype(held_item,/obj/item/weapon/reagent_containers/food/snacks/cracker) && (drop_gently)) - qdel(held_item) - held_item = null + QDEL_NULL(held_item) if(health < maxHealth) adjustBruteLoss(-10) emote("me",,"eagerly downs the cracker.") diff --git a/code/modules/mob/living/simple_animal/worm.dm b/code/modules/mob/living/simple_animal/worm.dm index aa883607986..12b92569134 100644 --- a/code/modules/mob/living/simple_animal/worm.dm +++ b/code/modules/mob/living/simple_animal/worm.dm @@ -178,19 +178,16 @@ if(!istype(stomachContent,/obj/item/stack/sheet/mineral/plasma)) var/obj/item/stack/oldStack = stomachContent new /obj/item/stack/sheet/mineral/plasma(src, oldStack.amount) - qdel(oldStack) - oldStack = null + QDEL_NULL(oldStack) continue else if(istype(stomachContent,/obj/item)) //converts to plasma, keeping the w_class var/obj/item/oldItem = stomachContent new /obj/item/stack/sheet/mineral/plasma(src, oldItem.w_class) - qdel(oldItem) - oldItem = null + QDEL_NULL(oldItem) continue else new /obj/item/stack/sheet/mineral/plasma(src, flatPlasmaValue) //just flat amount - qdel(stomachContent) - stomachContent = null + QDEL_NULL(stomachContent) continue if(previous) diff --git a/code/modules/mob/logout.dm b/code/modules/mob/logout.dm index 2b4d13ad0a4..a53b9ca24b1 100644 --- a/code/modules/mob/logout.dm +++ b/code/modules/mob/logout.dm @@ -8,8 +8,7 @@ if((flags & HEAR) && !(flags & HEAR_ALWAYS)) if(virtualhearer) - qdel(virtualhearer) - virtualhearer = null + QDEL_NULL(virtualhearer) remove_spell_channeling() //remove spell channeling before we log out @@ -22,7 +21,7 @@ clear_fullscreens(FALSE, 0) RemoveAllUIs() // Removes mind UIs - + if(client) for(var/datum/radial_menu/R in client.radial_menus) R.finish() diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index efa89cdda4f..d3fcf700b38 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -36,9 +36,7 @@ var/mob/living/carbon/Ca = src Ca.dropBorers(1)//sanity checking for borers that haven't been qdel'd yet if(client) - for(var/obj/abstract/screen/movable/spell_master/spell_master in spell_masters) - qdel(spell_master) - spell_masters = null + QDEL_LIST_NULL(spell_masters) remove_screen_objs() for(var/atom/movable/AM in client.screen) var/obj/abstract/screen/screenobj = AM @@ -57,17 +55,14 @@ attack_delayer = null special_delayer = null throw_delayer = null - qdel(hud_used) - hud_used = null + QDEL_NULL(hud_used) for(var/atom/movable/leftovers in src) qdel(leftovers) if(transmogged_from) - qdel(transmogged_from) - transmogged_from = null + QDEL_NULL(transmogged_from) if(transmogged_to) - qdel(transmogged_to) - transmogged_to = null + QDEL_NULL(transmogged_to) if(control_object.len) for(var/A in control_object) qdel(A) @@ -247,8 +242,7 @@ /mob/Del() if(flags & HEAR_ALWAYS) if(virtualhearer) - qdel(virtualhearer) - virtualhearer = null + QDEL_NULL(virtualhearer) ..() /mob/proc/is_muzzled() @@ -565,8 +559,7 @@ if(!W.mob_can_equip(src, slot, disable_warning)) switch(act_on_fail) if(EQUIP_FAILACTION_DELETE) - qdel(W) - W = null + QDEL_NULL(W) if(EQUIP_FAILACTION_DROP) W.forceMove(get_turf(src)) //Should this be using drop_from_inventory instead? else @@ -1278,8 +1271,7 @@ Use this proc preferably at the end of an equipment loadout var/mob/new_player/M = new /mob/new_player() if(!client) log_game("[usr.key] AM failed due to disconnect.") - qdel(M) - M = null + QDEL_NULL(M) return M.key = key diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index 05712d26f2b..d5ad91774cf 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -292,8 +292,7 @@ assailant.client.screen -= hud assailant = null if(hud) - qdel(hud) - hud = null + QDEL_NULL(hud) ..() /mob/proc/grab_check(mob/victim) diff --git a/code/modules/mob/mob_transformation_simple.dm b/code/modules/mob/mob_transformation_simple.dm index c0d35d50a0d..ccc6acab9c3 100644 --- a/code/modules/mob/mob_transformation_simple.dm +++ b/code/modules/mob/mob_transformation_simple.dm @@ -31,8 +31,7 @@ if(!M || !ismob(M)) to_chat(usr, "Type path is not a mob (new_type = [new_type]) in change_mob_type(). Contact a coder.") - qdel(M) - M = null + QDEL_NULL(M) return if( istext(new_name) ) diff --git a/code/modules/organs/internal/lungs/lung_gasses.dm b/code/modules/organs/internal/lungs/lung_gasses.dm index 49b85c929f3..30f2b52a3e3 100644 --- a/code/modules/organs/internal/lungs/lung_gasses.dm +++ b/code/modules/organs/internal/lungs/lung_gasses.dm @@ -16,8 +16,7 @@ lungs.gasses -= src lungs = null - qdel(breath) - breath = null + QDEL_NULL(breath) ..() /datum/lung_gas/proc/get_pp() diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 9ccb77e0bc4..2957c96f914 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -68,25 +68,10 @@ parent.children -= src parent = null - if(children) - for(var/datum/organ/external/O in children) - qdel(O) - children = null - - if(internal_organs) - for(var/datum/organ/internal/O in internal_organs) - qdel(O) - internal_organs = null - - if(implants) - for(var/obj/O in implants) - qdel(O) - implants = null - - if(wounds) - for(var/datum/wound/W in wounds) - qdel(W) - wounds = null + QDEL_LIST_NULL(children) + QDEL_LIST_NULL(internal_organs) + QDEL_LIST_NULL(implants) + QDEL_LIST_NULL(wounds) if(owner) owner.organs -= src @@ -729,8 +714,7 @@ Note that amputating the affected organ does in fact remove the infection from t if(istype(s)) implants -= s owner.contents -= s - qdel(s) - s = null + QDEL_NULL(s) amputated = 0 brute_dam = 0 burn_dam = 0 @@ -872,8 +856,7 @@ Note that amputating the affected organ does in fact remove the infection from t internal_organs -= O.organ_data O.removed(owner,owner) O.loc = headloc - qdel(organ) - organ = null + QDEL_NULL(organ) return organ @@ -1824,8 +1807,7 @@ Note that amputating the affected organ does in fact remove the infection from t /obj/item/organ/external/head/Destroy() if(brainmob) - qdel(brainmob) - brainmob = null + QDEL_NULL(brainmob) ..() //obj/item/organ/external/head/with_teeth starts with 32 human teeth! @@ -2024,8 +2006,7 @@ Note that amputating the affected organ does in fact remove the infection from t /obj/item/organ/external/head/Destroy() if(brainmob) brainmob.ghostize() - qdel(brainmob) - brainmob = null + QDEL_NULL(brainmob) ..() /mob/living/carbon/human/find_organ_by_grasp_index(index) diff --git a/code/modules/organs/organ_objects.dm b/code/modules/organs/organ_objects.dm index abf209f2a08..e4d7d287802 100644 --- a/code/modules/organs/organ_objects.dm +++ b/code/modules/organs/organ_objects.dm @@ -56,8 +56,7 @@ /obj/item/organ/internal/Destroy() if(!robotic) processing_objects -= src - qdel(organ_data) - organ_data = null + QDEL_NULL(organ_data) ..() /obj/item/organ/internal/examine(var/mob/user, var/size = "") diff --git a/code/modules/painting/paintings_custom.dm b/code/modules/painting/paintings_custom.dm index 743ee176a22..f9036d7bd40 100644 --- a/code/modules/painting/paintings_custom.dm +++ b/code/modules/painting/paintings_custom.dm @@ -42,8 +42,7 @@ var/list/gallery = score.global_paintings if(gallery.len && gallery.Find(src)) gallery -= src - qdel(painting_data) - painting_data = null + QDEL_NULL(painting_data) ..() /obj/structure/painting/custom/attackby(obj/item/W, mob/user) @@ -241,8 +240,7 @@ ..() /obj/item/mounted/frame/painting/custom/Destroy() - qdel(painting_data) - painting_data = null + QDEL_NULL(painting_data) ..() /obj/item/mounted/frame/painting/custom/attackby(obj/item/W, mob/user) diff --git a/code/modules/paperwork/envelope.dm b/code/modules/paperwork/envelope.dm index 88e40c0e09e..4103ebf5eb0 100644 --- a/code/modules/paperwork/envelope.dm +++ b/code/modules/paperwork/envelope.dm @@ -105,8 +105,7 @@ /obj/item/weapon/paper/envelope/Destroy() if(contained_item) - qdel(contained_item) - contained_item = null + QDEL_NULL(contained_item) ..() /obj/item/weapon/paper/envelope/attack_self(mob/living/user) diff --git a/code/modules/paperwork/handlabeler.dm b/code/modules/paperwork/handlabeler.dm index 188d31c02b7..3fa615259f7 100644 --- a/code/modules/paperwork/handlabeler.dm +++ b/code/modules/paperwork/handlabeler.dm @@ -89,8 +89,7 @@ LR.left = holder to_chat(user, "You switch the label rolls.") else - qdel(LR) - LR = null + QDEL_NULL(LR) to_chat(user, "You replace the label roll.") icon_state = "labeler0" diff --git a/code/modules/paperwork/nano_paper_bin.dm b/code/modules/paperwork/nano_paper_bin.dm index 07ee1967dee..06c3c9365c9 100644 --- a/code/modules/paperwork/nano_paper_bin.dm +++ b/code/modules/paperwork/nano_paper_bin.dm @@ -50,8 +50,7 @@ to_chat(user, "you load the [i] in the dispenser") i:amount-- if(i:amount < 1) - qdel(i) - i = null + QDEL_NULL(i) ressources += 30 update_icon() diff --git a/code/modules/paperwork/paper_folded.dm b/code/modules/paperwork/paper_folded.dm index d26acaab76e..7d07277224c 100644 --- a/code/modules/paperwork/paper_folded.dm +++ b/code/modules/paperwork/paper_folded.dm @@ -26,8 +26,7 @@ /obj/item/weapon/p_folded/Destroy() if (unfolded) - qdel(unfolded) - unfolded = null + QDEL_NULL(unfolded) return ..() /obj/item/weapon/p_folded/attack_self(mob/user as mob) diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index a3b5fdaf4e9..80234140425 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -193,8 +193,7 @@ flashbulb = new(src) /obj/item/device/camera/Destroy() - qdel(flashbulb) - flashbulb = null + QDEL_NULL(flashbulb) ..() /obj/item/device/camera/sepia diff --git a/code/modules/power/ShieldGen/shield_gen.dm b/code/modules/power/ShieldGen/shield_gen.dm index d3a88f2ff04..2455c89e407 100644 --- a/code/modules/power/ShieldGen/shield_gen.dm +++ b/code/modules/power/ShieldGen/shield_gen.dm @@ -233,8 +233,7 @@ /obj/machinery/shield_gen/proc/destroy_field() for(var/obj/effect/energy_field/D in field) field.Remove(D) - qdel(D) - D = null + QDEL_NULL(D) /obj/machinery/shield_gen/proc/stop() if(!active) diff --git a/code/modules/power/antimatter/control.dm b/code/modules/power/antimatter/control.dm index ed4e2392f44..128663a90d0 100644 --- a/code/modules/power/antimatter/control.dm +++ b/code/modules/power/antimatter/control.dm @@ -45,8 +45,7 @@ for(var/obj/machinery/am_shielding/AMS in linked_cores) AMS.control_unit = null qdel(AMS) - qdel(fueljar) - fueljar = null + QDEL_NULL(fueljar) ..() diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index c8a04d0c132..9d90d5784eb 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -566,16 +566,14 @@ user.visible_message(\ "[user.name] cut the cables and dismantled the power terminal.",\ "You cut the cables and dismantle the power terminal.") - qdel(terminal) - terminal = null + QDEL_NULL(terminal) else if (istype(W, /obj/item/weapon/circuitboard/power_control) && opened && has_electronics==0 && !((stat & BROKEN) || malfhack)) to_chat(user, "You begin to insert the power control board into the frame...") playsound(src, 'sound/items/Deconstruct.ogg', 50, 1) if (do_after(user, src, 10) && opened && has_electronics == 0 && !((stat & BROKEN) || malfhack)) has_electronics = 1 to_chat(user, "You place the power control board inside the frame.") - qdel(W) - W = null + QDEL_NULL(W) else if (istype(W, /obj/item/weapon/circuitboard/power_control) && opened && has_electronics==0 && ((stat & BROKEN) || malfhack)) to_chat(user, "You cannot put the board inside, the frame is damaged.") return @@ -607,8 +605,7 @@ user.visible_message(\ "[user.name] has replaced the damaged APC frontal panel with a new one.",\ "You replace the damaged APC frontal panel with a new one.") - qdel(W) - W = null + QDEL_NULL(W) update_icon() else if (istype(W, /obj/item/mounted/frame/apc_frame) && opened && ((stat & BROKEN) || malfhack)) if (has_electronics) @@ -619,8 +616,7 @@ user.visible_message(\ "[user.name] has replaced the damaged APC frame with new one.",\ "You replace the damaged APC frame with new one.") - qdel(W) - W = null + QDEL_NULL(W) stat &= ~BROKEN if(malfai) var/datum/role/malfAI/M = malfai.mind.GetRole(MALF) @@ -1027,8 +1023,7 @@ malf.mind.transfer_to(src.occupant) src.occupant.eyeobj.name = "[src.occupant.name] (AI Eye)" if(malf.parent) - qdel(malf) - malf = null + QDEL_NULL(malf) src.occupant.add_spell(new /spell/aoe_turf/corereturn, "malf_spell_ready",/obj/abstract/screen/movable/spell_master/malf) src.occupant.cancel_camera() if (seclevel2num(get_security_level()) == SEC_LEVEL_DELTA) @@ -1408,12 +1403,10 @@ malfvacate(1) if(cell) - qdel(cell) - cell = null + QDEL_NULL(cell) if(wires) - qdel(wires) - wires = null + QDEL_NULL(wires) if(malfimage) qdel(malfimage) diff --git a/code/modules/power/monitor.dm b/code/modules/power/monitor.dm index 302424d6a28..c19aedf0903 100644 --- a/code/modules/power/monitor.dm +++ b/code/modules/power/monitor.dm @@ -80,8 +80,7 @@ /obj/machinery/computer/powermonitor/Destroy() if(power_connection) - qdel(power_connection) - power_connection = null + QDEL_NULL(power_connection) . = ..() /obj/machinery/computer/powermonitor/initialize() diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index 95112a8e9fb..2bfaa863248 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -101,8 +101,7 @@ else if(beam) beam._re_emit = 0 - qdel(beam) - beam = null + QDEL_NULL(beam) /obj/machinery/power/emitter/receive_signal(datum/signal/signal) if(!signal.data["tag"] || (signal.data["tag"] != id_tag)) diff --git a/code/modules/power/singularity/field_generator.dm b/code/modules/power/singularity/field_generator.dm index 5d81009fb5a..590284e987a 100644 --- a/code/modules/power/singularity/field_generator.dm +++ b/code/modules/power/singularity/field_generator.dm @@ -281,8 +281,7 @@ var/global/list/obj/machinery/field_generator/field_gen_list = list() for (var/obj/machinery/containment_field/F in fields) if (isnull(F)) continue - qdel(F) - F = null + QDEL_NULL(F) fields = list() for(var/obj/machinery/field_generator/FG in connected_gens) if (isnull(FG)) diff --git a/code/modules/power/singularity/particle_accelerator/particle_control.dm b/code/modules/power/singularity/particle_accelerator/particle_control.dm index 36ec8534324..737ca89a1c0 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_control.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_control.dm @@ -34,8 +34,7 @@ toggle_power() if(wires) - qdel(wires) - wires = null + QDEL_NULL(wires) ..() diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index 84818b1f0e8..b46c13d837d 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -104,8 +104,7 @@ var/list/smes_list = list() user.visible_message(\ "[user.name] cut the cables and dismantled the power terminal.",\ "You cut the cables and dismantle the power terminal.") - qdel(terminal) - terminal = null + QDEL_NULL(terminal) else user.set_machine(src) interact(user) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 25e3085d331..1713e71f0e6 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -75,8 +75,7 @@ /obj/item/weapon/gun/Destroy() if(in_chamber) - qdel(in_chamber) - in_chamber = null + QDEL_NULL(in_chamber) ..() /obj/item/weapon/gun/proc/ready_to_fire() @@ -254,8 +253,7 @@ if(targloc == curloc) target.bullet_act(in_chamber) - qdel(in_chamber) - in_chamber = null + QDEL_NULL(in_chamber) update_icon() play_firesound(user, reflex) return @@ -384,8 +382,7 @@ else to_chat(user, "Ow...") user.apply_effect(110,AGONY,0) - qdel(in_chamber) - in_chamber = null + QDEL_NULL(in_chamber) mouthshoot = 0 return else diff --git a/code/modules/projectiles/guns/energy/lasmusket.dm b/code/modules/projectiles/guns/energy/lasmusket.dm index aa38e884204..f80ee41d0ac 100644 --- a/code/modules/projectiles/guns/energy/lasmusket.dm +++ b/code/modules/projectiles/guns/energy/lasmusket.dm @@ -26,11 +26,9 @@ /obj/item/weapon/gun/energy/lasmusket/Destroy() if(loadedassembly) - qdel(loadedassembly) - loadedassembly = null + QDEL_NULL(loadedassembly) if(loadedcell) - qdel(loadedcell) - loadedcell = null + QDEL_NULL(loadedcell) ..() /obj/item/weapon/gun/energy/lasmusket/attack_self(mob/user as mob) @@ -273,18 +271,15 @@ if(strength > 50000 && !flawless) to_chat(user, "\The [loadedassembly] inside \the [src] melts!") to_chat(user, "\The [loadedcell] inside \the [src]'s power bank ruptures!") - qdel(loadedassembly) - loadedassembly = null + QDEL_NULL(loadedassembly) lens_secure = 0 - qdel(loadedcell) - loadedcell = null + QDEL_NULL(loadedcell) cell_secure = 0 else if (!flawless) loadedassembly.durability -= (strength/2000) //Lens assembly degrades with each shot. Ultra cell gives 4 shots. if(loadedassembly.durability <= 0) to_chat(user, "\The [loadedassembly] inside \the [src] [strength > 100 ? "shatters under" : "finally fractures from"] the stress!") - qdel(loadedassembly) - loadedassembly = null + QDEL_NULL(loadedassembly) lens_secure = 0 fire_sound = initial(fire_sound) update_icon() diff --git a/code/modules/projectiles/guns/lawgiver.dm b/code/modules/projectiles/guns/lawgiver.dm index 30142107ed8..8ef05afaacc 100644 --- a/code/modules/projectiles/guns/lawgiver.dm +++ b/code/modules/projectiles/guns/lawgiver.dm @@ -151,8 +151,7 @@ var/list/lawgiver_modes = list( /obj/item/weapon/gun/lawgiver/Destroy() if(magazine) - qdel(magazine) - magazine = null + QDEL_NULL(magazine) ..() /obj/item/weapon/gun/lawgiver/GetVoice() @@ -336,8 +335,7 @@ var/list/lawgiver_modes = list( for(var/datum/lawgiver_mode/M in lawgiver_modes[type]) if(in_chamber && (in_chamber.type == M.projectile_type)) magazine.ammo_counters[M] = min(magazine.ammo_counters[M]+M.ammo_per_shot,LAWGIVER_MAX_AMMO * M.ammo_per_shot) - qdel(in_chamber) - in_chamber = null + QDEL_NULL(in_chamber) if(in_chamber) return 1 if(!magazine) @@ -425,8 +423,7 @@ var/list/lawgiver_modes = list( return if(in_chamber) - qdel(in_chamber) - in_chamber = null + QDEL_NULL(in_chamber) if(!special_check()) return if(!chamber_round()) diff --git a/code/modules/projectiles/guns/portalgun.dm b/code/modules/projectiles/guns/portalgun.dm index a095debcc41..362c5d0b62f 100644 --- a/code/modules/projectiles/guns/portalgun.dm +++ b/code/modules/projectiles/guns/portalgun.dm @@ -26,11 +26,9 @@ /obj/item/weapon/gun/portalgun/Destroy() if(blue_portal) - qdel(blue_portal) - blue_portal = null + QDEL_NULL(blue_portal) if(red_portal) - qdel(red_portal) - red_portal = null + QDEL_NULL(red_portal) ..() /obj/item/weapon/gun/portalgun/process_chambered() @@ -68,15 +66,13 @@ switch(setting) if(0) if(blue_portal) - qdel(blue_portal) - blue_portal = null + QDEL_NULL(blue_portal) blue_portal = new_portal blue_portal.creator = src blue_portal.owner = firer if(1) if(red_portal) - qdel(red_portal) - red_portal = null + QDEL_NULL(red_portal) red_portal = new_portal red_portal.icon_state = "portal1" red_portal.creator = src diff --git a/code/modules/projectiles/guns/projectile/constructable/blastcannon.dm b/code/modules/projectiles/guns/projectile/constructable/blastcannon.dm index c899f4911a5..d10a61e3746 100644 --- a/code/modules/projectiles/guns/projectile/constructable/blastcannon.dm +++ b/code/modules/projectiles/guns/projectile/constructable/blastcannon.dm @@ -24,8 +24,7 @@ /obj/item/weapon/gun/projectile/blastcannon/Destroy() if(bomb) - qdel(bomb) - bomb = null + QDEL_NULL(bomb) bomb_appearance = null bomb_air_contents_1 = null bomb_air_contents_2 = null diff --git a/code/modules/projectiles/guns/projectile/constructable/blinder.dm b/code/modules/projectiles/guns/projectile/constructable/blinder.dm index a994941f247..104f9798e2b 100644 --- a/code/modules/projectiles/guns/projectile/constructable/blinder.dm +++ b/code/modules/projectiles/guns/projectile/constructable/blinder.dm @@ -23,11 +23,9 @@ /obj/item/device/blinder/Destroy() if(cell) - qdel(cell) - cell = null + QDEL_NULL(cell) if(flashbulb) - qdel(flashbulb) - flashbulb = null + QDEL_NULL(flashbulb) ..() /obj/item/device/blinder/New(var/empty = FALSE) diff --git a/code/modules/projectiles/guns/projectile/constructable/blunderbuss.dm b/code/modules/projectiles/guns/projectile/constructable/blunderbuss.dm index 0bc67338815..9bf17d55e74 100644 --- a/code/modules/projectiles/guns/projectile/constructable/blunderbuss.dm +++ b/code/modules/projectiles/guns/projectile/constructable/blunderbuss.dm @@ -32,8 +32,7 @@ /obj/item/weapon/blunderbuss/Destroy() if(loaded_item) - qdel(loaded_item) - loaded_item = null + QDEL_NULL(loaded_item) ..() /obj/item/weapon/blunderbuss/proc/update_verbs() diff --git a/code/modules/projectiles/guns/projectile/constructable/cannon.dm b/code/modules/projectiles/guns/projectile/constructable/cannon.dm index dc8ed6de668..7fce6a3a540 100644 --- a/code/modules/projectiles/guns/projectile/constructable/cannon.dm +++ b/code/modules/projectiles/guns/projectile/constructable/cannon.dm @@ -18,8 +18,7 @@ /obj/structure/bed/chair/vehicle/wheelchair/wheelchair_assembly/cannon/Destroy() if(loaded_item) - qdel(loaded_item) - loaded_item = null + QDEL_NULL(loaded_item) ..() /obj/structure/bed/chair/vehicle/wheelchair/wheelchair_assembly/cannon/proc/update_verbs() diff --git a/code/modules/projectiles/guns/projectile/constructable/flamethrower.dm b/code/modules/projectiles/guns/projectile/constructable/flamethrower.dm index 0add00951bc..507861494e5 100644 --- a/code/modules/projectiles/guns/projectile/constructable/flamethrower.dm +++ b/code/modules/projectiles/guns/projectile/constructable/flamethrower.dm @@ -38,14 +38,11 @@ /obj/item/weapon/gun/projectile/flamethrower/Destroy() if(weldtool) - qdel(weldtool) - weldtool = null + QDEL_NULL(weldtool) if(igniter) - qdel(igniter) - igniter = null + QDEL_NULL(igniter) if(ptank) - qdel(ptank) - ptank = null + QDEL_NULL(ptank) ..() return diff --git a/code/modules/projectiles/guns/projectile/constructable/gunsmithing.dm b/code/modules/projectiles/guns/projectile/constructable/gunsmithing.dm index 075148f7743..3362546aa94 100644 --- a/code/modules/projectiles/guns/projectile/constructable/gunsmithing.dm +++ b/code/modules/projectiles/guns/projectile/constructable/gunsmithing.dm @@ -264,8 +264,7 @@ /obj/item/weapon/cylinder/Destroy() for(var/i = 1; i < chambers.len; i++) if(chambers[i]) - qdel(chambers[i]) - chambers[i] = null + QDEL_NULL(chambers[i]) ..() /obj/item/weapon/cylinder/proc/cycle() diff --git a/code/modules/projectiles/guns/projectile/constructable/railgun.dm b/code/modules/projectiles/guns/projectile/constructable/railgun.dm index 494c9a8a1a9..7208d3205a7 100644 --- a/code/modules/projectiles/guns/projectile/constructable/railgun.dm +++ b/code/modules/projectiles/guns/projectile/constructable/railgun.dm @@ -27,14 +27,11 @@ /obj/item/weapon/gun/projectile/railgun/Destroy() if(loadedassembly) - qdel(loadedassembly) - loadedassembly = null + QDEL_NULL(loadedassembly) if(loadedcapacitor) - qdel(loadedcapacitor) - loadedcapacitor = null + QDEL_NULL(loadedcapacitor) if(loadedammo) - qdel(loadedammo) - loadedammo = null + QDEL_NULL(loadedammo) ..() /obj/item/weapon/gun/projectile/railgun/attack_self(mob/user as mob) @@ -256,17 +253,14 @@ if(strength >= 200) to_chat(user, "\The [loadedassembly] inside \the [src] melts!") to_chat(user, "\The [loadedcapacitor] inside \the [src]'s capacitor bank melts!") - qdel(loadedassembly) - loadedassembly = null + QDEL_NULL(loadedassembly) rails_secure = 0 - qdel(loadedcapacitor) - loadedcapacitor = null + QDEL_NULL(loadedcapacitor) else loadedassembly.durability -= strength if(loadedassembly.durability <= 0) to_chat(user, "\The [loadedassembly] inside \the [src] [strength > 100 ? "shatters under" : "finally fractures from"] the stress!") - qdel(loadedassembly) - loadedassembly = null + QDEL_NULL(loadedassembly) rails_secure = 0 fire_sound = initial(fire_sound) else diff --git a/code/modules/projectiles/guns/projectile/constructable/revialver.dm b/code/modules/projectiles/guns/projectile/constructable/revialver.dm index 2a4ef4a86b6..b1e30032d0b 100644 --- a/code/modules/projectiles/guns/projectile/constructable/revialver.dm +++ b/code/modules/projectiles/guns/projectile/constructable/revialver.dm @@ -20,8 +20,7 @@ /obj/item/weapon/gun/projectile/revialver/Destroy() if(cylinder) - qdel(cylinder) - cylinder = null + QDEL_NULL(cylinder) ..() /obj/item/weapon/gun/projectile/revialver/attack_self(mob/user as mob) diff --git a/code/modules/projectiles/guns/projectile/constructable/subspacetunneler.dm b/code/modules/projectiles/guns/projectile/constructable/subspacetunneler.dm index f82d975c665..219666445f6 100644 --- a/code/modules/projectiles/guns/projectile/constructable/subspacetunneler.dm +++ b/code/modules/projectiles/guns/projectile/constructable/subspacetunneler.dm @@ -65,11 +65,9 @@ /obj/item/weapon/subspacetunneler/Destroy() var/turf/currturf = get_turf(src) if(loaded_crystal) - qdel(loaded_crystal) - loaded_crystal = null + QDEL_NULL(loaded_crystal) if(loaded_matter_bin) - qdel(loaded_matter_bin) - loaded_matter_bin = null + QDEL_NULL(loaded_matter_bin) if(stored_items.len) for(var/atom/movable/AM in stored_items) AM.forceMove(null) diff --git a/code/modules/projectiles/guns/projectile/constructable/swords.dm b/code/modules/projectiles/guns/projectile/constructable/swords.dm index 04226b1e914..a9ca73f2c77 100644 --- a/code/modules/projectiles/guns/projectile/constructable/swords.dm +++ b/code/modules/projectiles/guns/projectile/constructable/swords.dm @@ -68,8 +68,7 @@ /obj/item/weapon/sword/weaponcraft/Destroy() if(hypo) - qdel(hypo) - hypo = null + QDEL_NULL(hypo) ..() /obj/item/weapon/sword/venom @@ -110,11 +109,9 @@ /obj/item/weapon/sword/venom/Destroy() if(beaker) - qdel(beaker) - beaker = null + QDEL_NULL(beaker) if(HY) - qdel(HY) - HY = null + QDEL_NULL(HY) ..() /obj/item/weapon/sword/venom/proc/update_color() diff --git a/code/modules/projectiles/guns/projectile/constructable/tomahawk.dm b/code/modules/projectiles/guns/projectile/constructable/tomahawk.dm index 32c2cb7c626..24228677113 100644 --- a/code/modules/projectiles/guns/projectile/constructable/tomahawk.dm +++ b/code/modules/projectiles/guns/projectile/constructable/tomahawk.dm @@ -162,8 +162,7 @@ /obj/item/weapon/hatchet/tomahawk/pipe/Destroy() if(current_blunt) current_blunt.unregister_event(/event/destroyed, src, .proc/burnout) - qdel(current_blunt) - current_blunt = null + QDEL_NULL(current_blunt) ..() /obj/item/weapon/hatchet/tomahawk/pipe/examine(mob/user) @@ -243,8 +242,7 @@ if(current_blunt) to_chat(usr, "You empty the crushed [blunt_name] out of \the [src].") not_burned_out = 1 - qdel(current_blunt) - current_blunt = null + QDEL_NULL(current_blunt) verbs -= /obj/item/weapon/hatchet/tomahawk/pipe/verb/empty_pipe /obj/item/weapon/hatchet/tomahawk/pipe/proc/burnout() @@ -378,8 +376,7 @@ if(current_blunt) to_chat(usr, "You empty the crushed [blunt_name] out of \the [src].") not_burned_out = 1 - qdel(current_blunt) - current_blunt = null + QDEL_NULL(current_blunt) verbs -= /obj/item/weapon/broken_pipe_tomahawk/verb/empty_pipe /obj/item/weapon/broken_pipe_tomahawk/proc/burnout(datum/thing) diff --git a/code/modules/projectiles/guns/projectile/mahoguny.dm b/code/modules/projectiles/guns/projectile/mahoguny.dm index 3ceabc4146b..215cb9b2ff7 100644 --- a/code/modules/projectiles/guns/projectile/mahoguny.dm +++ b/code/modules/projectiles/guns/projectile/mahoguny.dm @@ -33,8 +33,7 @@ if(!current_ammo) return click_empty(user) if(in_chamber) - qdel(in_chamber) - in_chamber = null + QDEL_NULL(in_chamber) in_chamber = new/obj/item/projectile/bullet/mahoganut(src) if(Fire(A,user,params, "struggle" = struggle)) current_ammo-- diff --git a/code/modules/projectiles/guns/projectile/revolver.dm b/code/modules/projectiles/guns/projectile/revolver.dm index 6de88b07c69..acb20fa43ea 100644 --- a/code/modules/projectiles/guns/projectile/revolver.dm +++ b/code/modules/projectiles/guns/projectile/revolver.dm @@ -347,8 +347,7 @@ playsound(user, fire_sound, fire_volume, 1) in_chamber.on_hit(user) user.apply_damage(in_chamber.damage*1.5, in_chamber.damage_type, LIMB_HEAD, used_weapon = "Point blank shot in the mouth with \a [in_chamber]") - qdel(in_chamber) - in_chamber = null + QDEL_NULL(in_chamber) make_peel(user) user.visible_message("\The [src] explodes as \the [user] bites into it!","\The [src] explodes as you bite into it!") diff --git a/code/modules/projectiles/guns/projectile/siren.dm b/code/modules/projectiles/guns/projectile/siren.dm index 2c2b76d9419..464029d960b 100644 --- a/code/modules/projectiles/guns/projectile/siren.dm +++ b/code/modules/projectiles/guns/projectile/siren.dm @@ -36,8 +36,7 @@ reagents.clear_reagents() to_chat(usr, "You flush out the contents of \the [src].") if(in_chamber) - qdel(in_chamber) - in_chamber = null + QDEL_NULL(in_chamber) /obj/item/weapon/gun/siren/examine(mob/user) ..() @@ -78,8 +77,7 @@ for(var/datum/reagent/R in in_chamber.reagents.reagent_list) in_chamber.reagents.remove_reagent(R.id, reagents.get_reagent_amount(R.id)*4) in_chamber.reagents.trans_to(src, in_chamber.reagents.total_volume) - qdel(in_chamber) - in_chamber = null + QDEL_NULL(in_chamber) in_chamber = new projectile_type(src, hard) reagents.trans_to(in_chamber, 10) if(!hard) //When set to no-damage mode, each shot has five times the reagents. @@ -182,5 +180,4 @@ reagents.clear_reagents() to_chat(user, "You flush out the contents of \the [src].") if(in_chamber) - qdel(in_chamber) - in_chamber = null + QDEL_NULL(in_chamber) diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index 76ffaebe0e9..05d554d99c8 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -129,8 +129,7 @@ var/list/impact_master = list() /obj/item/projectile/proc/on_hit(var/atom/atarget, var/blocked = 0) - qdel(tracker_datum) - tracker_datum = null + QDEL_NULL(tracker_datum) if(blocked >= 100) return 0//Full block @@ -170,8 +169,7 @@ var/list/impact_master = list() in_chamber.firer = user var/output = in_chamber.process() //Test it! //del(in_chamber) //No need for it anymore - qdel(in_chamber) - in_chamber = null + QDEL_NULL(in_chamber) return output //Send it back to the gun! /obj/item/projectile/proc/admin_warn(mob/living/M) diff --git a/code/modules/projectiles/projectile/beams.dm b/code/modules/projectiles/projectile/beams.dm index f4858bf782f..65e87ef1436 100644 --- a/code/modules/projectiles/projectile/beams.dm +++ b/code/modules/projectiles/projectile/beams.dm @@ -31,9 +31,7 @@ var/list/beam_master = list() /ray/beam_ray/Destroy() fired_beam = null - for(var/rayCastHit/H in hit_cache) - qdel(H) - hit_cache = null + QDEL_LIST_NULL(hit_cache) ..() /ray/beam_ray/cast(max_distance, max_hits, ignore_origin) @@ -86,9 +84,7 @@ var/list/beam_master = list() var/list/ray/past_rays = list() //full of rays /obj/item/projectile/beam/Destroy() - for(var/ray/R in past_rays) - qdel(R) - past_rays = null + QDEL_LIST_NULL(past_rays) ..() @@ -348,8 +344,7 @@ var/list/beam_master = list() if(TT == firer.loc) continue if(TT.density) - qdel(X) - X = null + QDEL_NULL(X) break for(var/atom/movable/O in TT) if(!O.Cross(src)) @@ -359,14 +354,12 @@ var/list/beam_master = list() for(var/mob/living/O in TT.contents) if(istype(O, /mob/living)) if(O.density) - qdel(X) - X = null + QDEL_NULL(X) broke = 1 break if(broke) if(X) - qdel(X) - X = null + QDEL_NULL(X) break spawn(10) for(var/atom/thing in ouroverlays) diff --git a/code/modules/projectiles/projectile/bullets.dm b/code/modules/projectiles/projectile/bullets.dm index b21054c8ad4..ba8a75679ab 100644 --- a/code/modules/projectiles/projectile/bullets.dm +++ b/code/modules/projectiles/projectile/bullets.dm @@ -565,8 +565,7 @@ /obj/item/projectile/bullet/vial/Destroy() if(vial) - qdel(vial) - vial = null + QDEL_NULL(vial) if(user) user = null ..() diff --git a/code/modules/projectiles/targeting.dm b/code/modules/projectiles/targeting.dm index 67dba334611..2e97f1118a7 100644 --- a/code/modules/projectiles/targeting.dm +++ b/code/modules/projectiles/targeting.dm @@ -41,8 +41,7 @@ for(var/mob/living/M in target) if(M) M.NotTargeted(src) //Untargeting people. - qdel(target) - target = null + QDEL_NULL(target) //Compute how to fire..... /obj/item/weapon/gun/proc/PreFire(atom/A as mob|obj|turf|area, mob/living/user as mob|obj, params, struggle = 0) @@ -70,8 +69,7 @@ for(var/mob/living/L in target) if(L) L.NotTargeted(src) - qdel(target) - target = null + QDEL_NULL(target) usr.visible_message("[usr] turns \the [src] on [M]!") else usr.visible_message("[usr] aims \a [src] at [M]!") @@ -316,8 +314,7 @@ else to_chat(usr, "Target may no longer move.") target_can_run = 0 - qdel(usr.gun_run_icon) //no need for icon for running permission - usr.gun_run_icon = null + QDEL_NULL(usr.gun_run_icon) //no need for icon for running permission //Updating walking permission button if(usr.gun_move_icon) diff --git a/code/modules/reagents/Chemistry-Recipes.dm b/code/modules/reagents/Chemistry-Recipes.dm index 6e172f0fe7a..6e560e294c8 100644 --- a/code/modules/reagents/Chemistry-Recipes.dm +++ b/code/modules/reagents/Chemistry-Recipes.dm @@ -2122,8 +2122,7 @@ M.client.screen += blueeffect sleep(20) M.client.screen -= blueeffect - qdel(blueeffect) - blueeffect = null + QDEL_NULL(blueeffect) ..() /datum/chemical_reaction/slime_extract/slimecrystal diff --git a/code/modules/reagents/machinery/chem_dispenser.dm b/code/modules/reagents/machinery/chem_dispenser.dm index 521ce74e79c..482ba64dda5 100644 --- a/code/modules/reagents/machinery/chem_dispenser.dm +++ b/code/modules/reagents/machinery/chem_dispenser.dm @@ -293,8 +293,7 @@ USE THIS CHEMISTRY DISPENSER FOR MAPS SO THEY START AT 100 ENERGY if(!B.gcDestroyed) B.create_reagents(B.volume) else - qdel(B) - B = null + QDEL_NULL(B) return var/space = R.maximum_volume - R.total_volume var/reagent_temperature = dispensable_reagents[reagent] ? dispensable_reagents[reagent] : T0C+20 diff --git a/code/modules/reagents/machinery/mortar.dm b/code/modules/reagents/machinery/mortar.dm index f58f1f4fbc2..4bf58290709 100644 --- a/code/modules/reagents/machinery/mortar.dm +++ b/code/modules/reagents/machinery/mortar.dm @@ -48,8 +48,7 @@ var/obj/item/crushable = null /obj/item/weapon/reagent_containers/glass/mortar/Destroy() - qdel(crushable) - crushable = null + QDEL_NULL(crushable) . = ..() /obj/item/weapon/reagent_containers/glass/mortar/attackby(var/obj/item/O as obj, var/mob/user as mob) @@ -141,8 +140,7 @@ else flick(crush_flick,src) to_chat(user, "You smash the contents into nothingness.") - qdel(crushable) - crushable = null + QDEL_NULL(crushable) return /obj/item/weapon/reagent_containers/glass/mortar/examine(mob/user) diff --git a/code/modules/reagents/machinery/reagentgrinder.dm b/code/modules/reagents/machinery/reagentgrinder.dm index 2addaa6fd36..1290a92abf7 100644 --- a/code/modules/reagents/machinery/reagentgrinder.dm +++ b/code/modules/reagents/machinery/reagentgrinder.dm @@ -423,8 +423,7 @@ var/global/list/juice_items = list ( /obj/machinery/reagentgrinder/proc/remove_object(var/obj/item/O) holdingitems -= O - qdel(O) - O = null + QDEL_NULL(O) /obj/machinery/reagentgrinder/proc/juice() power_change() diff --git a/code/modules/reagents/reagent_containers/food/drinks.dm b/code/modules/reagents/reagent_containers/food/drinks.dm index 4a602d7cfc7..caadabdbc2e 100644 --- a/code/modules/reagents/reagent_containers/food/drinks.dm +++ b/code/modules/reagents/reagent_containers/food/drinks.dm @@ -1874,8 +1874,7 @@ /obj/item/weapon/reagent_containers/food/drinks/attackby(var/obj/item/I, mob/user as mob) if(istype(I, /obj/item/weapon/reagent_containers/glass/rag) && molotov == -1) //check if it is a molotovable drink - just beer and ale for now - other bottles require different rag overlay positions - if you can figure this out then go for it to_chat(user, "You stuff the [I] into the mouth of the [src].") - qdel(I) - I = null //?? + QDEL_NULL(I) //?? var/obj/item/weapon/reagent_containers/food/drinks/dummy = /obj/item/weapon/reagent_containers/food/drinks/molotov molotov = initial(dummy.molotov) flags = initial(dummy.flags) diff --git a/code/modules/reagents/reagent_containers/food/mobcube.dm b/code/modules/reagents/reagent_containers/food/mobcube.dm index 4dcc2b357a4..048e956aaed 100644 --- a/code/modules/reagents/reagent_containers/food/mobcube.dm +++ b/code/modules/reagents/reagent_containers/food/mobcube.dm @@ -13,8 +13,7 @@ /obj/item/weapon/reagent_containers/food/snacks/monkeycube/Destroy() if(contained_mob && isdatum(contained_mob)) - qdel(contained_mob) - contained_mob = null + QDEL_NULL(contained_mob) ..() /obj/item/weapon/reagent_containers/food/snacks/monkeycube/afterattack(obj/O, mob/user,proximity) diff --git a/code/modules/reagents/reagent_containers/food/snacks/meat.dm b/code/modules/reagents/reagent_containers/food/snacks/meat.dm index ab175f16eab..aeb5cf27e52 100644 --- a/code/modules/reagents/reagent_containers/food/snacks/meat.dm +++ b/code/modules/reagents/reagent_containers/food/snacks/meat.dm @@ -30,8 +30,7 @@ /obj/item/weapon/reagent_containers/food/snacks/meat/Destroy() ..() if(poisonsacs) - qdel(poisonsacs) - poisonsacs = null + QDEL_NULL(poisonsacs) /obj/item/weapon/reagent_containers/food/snacks/meat/animal //This meat spawns when an animal is butchered, and its name is set to '[animal.species_name] meat' (like "cat meat") var/animal_name = "animal" diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm index 6774a7188a0..340004c9860 100644 --- a/code/modules/reagents/reagent_containers/glass.dm +++ b/code/modules/reagents/reagent_containers/glass.dm @@ -435,8 +435,7 @@ /obj/item/weapon/reagent_containers/glass/bucket/attackby(var/obj/D, mob/user as mob) if(isprox(D)) to_chat(user, "You add \the [D] to \the [src].") - qdel(D) - D = null + QDEL_NULL(D) user.put_in_hands(new /obj/item/weapon/bucket_sensor) user.drop_from_inventory(src) qdel(src) diff --git a/code/modules/reagents/reagent_containers/glass/jar.dm b/code/modules/reagents/reagent_containers/glass/jar.dm index e0ec317d2ca..27d8f940243 100644 --- a/code/modules/reagents/reagent_containers/glass/jar.dm +++ b/code/modules/reagents/reagent_containers/glass/jar.dm @@ -21,8 +21,7 @@ processing_objects.Add(src) /obj/item/weapon/reagent_containers/glass/jar/Destroy() - qdel(held_item) - held_item = null + QDEL_NULL(held_item) processing_objects.Remove(src) ..() diff --git a/code/modules/recycling/conveyor_assembly.dm b/code/modules/recycling/conveyor_assembly.dm index e2faa36b5f5..cbbbdc6c6f1 100644 --- a/code/modules/recycling/conveyor_assembly.dm +++ b/code/modules/recycling/conveyor_assembly.dm @@ -16,8 +16,7 @@ /obj/item/stack/conveyor_assembly/dropped() ..() if(active) - qdel(active) - active = null + QDEL_NULL(active) /obj/item/stack/conveyor_assembly/attack_self(mob/user) if(!active) //Start click drag construction @@ -25,8 +24,7 @@ to_chat(user, "Beginning conveyor construction mode, click and drag screen in direction you wish conveyor to go.") return else - qdel(active) - active = null + QDEL_NULL(active) /obj/item/stack/conveyor_assembly/drag_mousedown(mob/user, turf/origin) if(istype(origin) && user.Adjacent(origin) && (!locate(/obj/structure/conveyor_assembly) in origin) && (!locate(/obj/machinery/conveyor) in origin) && !origin.density) @@ -35,8 +33,7 @@ user.client.images += placeimage placeloc = origin else - qdel(active) - active = null + QDEL_NULL(active) /obj/item/stack/conveyor_assembly/can_drag_use(mob/user, turf/T) return placeimage.dir != get_dir(placeloc, T) diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index e43221a6719..d0c6522a440 100755 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -273,8 +273,7 @@ /obj/machinery/sorting_machine/Destroy() . = ..() - qdel(mover) - mover = null + QDEL_NULL(mover) /obj/machinery/sorting_machine/RefreshParts() var/T = 0 @@ -763,7 +762,7 @@ idle_power_usage = 100 //No active power usage because this thing passively uses 100, always. Don't ask me why N3X15 coded it like this. plane = ABOVE_HUMAN_PLANE var/circuitpath = /obj/item/weapon/circuitboard/autoprocessor - + var/atom/movable/mover //Virtual atom used to check passing ability on the out turf. var/next_sound = 0 @@ -788,8 +787,7 @@ /obj/machinery/autoprocessor/Destroy() . = ..() - qdel(mover) - mover = null + QDEL_NULL(mover) /obj/machinery/autoprocessor/RefreshParts() var/T = 0 @@ -1107,8 +1105,7 @@ outfit_datum = new outfit_type() /obj/machinery/autoprocessor/outfit/Destroy() - qdel(outfit_datum) - outfit_datum = null + QDEL_NULL(outfit_datum) ..() /obj/machinery/autoprocessor/outfit/process_affecting(var/atom/movable/target) diff --git a/code/modules/research/mechanic/reverse_engine.dm b/code/modules/research/mechanic/reverse_engine.dm index c481fac4bb9..6f3d99e5435 100644 --- a/code/modules/research/mechanic/reverse_engine.dm +++ b/code/modules/research/mechanic/reverse_engine.dm @@ -233,8 +233,7 @@ var/datum/design/design = research_queue[text2num(href_list["remove_tosearch"])] if(design) research_queue -= design - qdel(design) - design = null + QDEL_NULL(design) ui_interact(usr) return 1 diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index 806ef762287..7b88e1a7092 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -265,8 +265,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, else if(linked_lathe && linked_destroy.loaded_item.materials) linked_destroy.loaded_item.materials.TransferAll(linked_lathe.materials) - qdel(linked_destroy.loaded_item) - linked_destroy.loaded_item = null + QDEL_NULL(linked_destroy.loaded_item) if(linked_destroy.loaded_item) //It deconstructed something with stacks, make it show up full linked_destroy.icon_state = "d_analyzer_l" else @@ -554,8 +553,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, sheet.amount = min(available_num_sheets, desired_num_sheets) linked_lathe.materials.removeAmount(matID, sheet.amount * sheet.perunit) else - qdel (sheet) - sheet = null + QDEL_NULL (sheet) else if(href_list["imprinter_ejectsheet"] && linked_imprinter) //Causes the protolathe to eject a sheet of material if(!src.allowed(usr)) to_chat(usr, "Unauthorized Access.") @@ -574,8 +572,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, sheet.amount = min(available_num_sheets, desired_num_sheets) linked_imprinter.materials.removeAmount(matID, sheet.amount * sheet.perunit) else - qdel (sheet) - sheet = null + QDEL_NULL (sheet) else if(href_list["find_device"]) //The R&D console looks for devices nearby to link up with. screen = 0.0 diff --git a/code/modules/research/xenoarchaeology/artifact/artifact_unknown.dm b/code/modules/research/xenoarchaeology/artifact/artifact_unknown.dm index 09d780c04f8..dd7896afba6 100644 --- a/code/modules/research/xenoarchaeology/artifact/artifact_unknown.dm +++ b/code/modules/research/xenoarchaeology/artifact/artifact_unknown.dm @@ -219,8 +219,8 @@ var/list/razed_large_artifacts = list()//destroyed while still inside a rock wal /obj/machinery/artifact/Destroy() new /datum/artifact_postmortem_data(src) - qdel(primary_effect); primary_effect = null - qdel(secondary_effect); secondary_effect = null + QDEL_NULL(primary_effect) + QDEL_NULL(secondary_effect) ..() /proc/ArtifactRepercussion(var/atom/source, var/mob/mob_cause = null, var/other_cause = "", var/artifact_type = "") diff --git a/code/modules/research/xenoarchaeology/artifact/effect.dm b/code/modules/research/xenoarchaeology/artifact/effect.dm index e9ceb4bedea..c3c646dc52e 100644 --- a/code/modules/research/xenoarchaeology/artifact/effect.dm +++ b/code/modules/research/xenoarchaeology/artifact/effect.dm @@ -211,8 +211,7 @@ /datum/artifact_effect/Destroy() if(trigger) - qdel(trigger) - trigger = null + QDEL_NULL(trigger) copy_for_battery = null holder = null ..() diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_forcefield.dm b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_forcefield.dm index b3ec25bc93b..b51fdbae233 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_forcefield.dm +++ b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_forcefield.dm @@ -11,8 +11,7 @@ spawn(0) if(trigger && !istype(trigger,/datum/artifact_trigger/touch/)) var/trigger_override = /datum/artifact_trigger/touch - qdel(trigger) - trigger = null + QDEL_NULL(trigger) trigger = new trigger_override(src) /datum/artifact_effect/forcefield/ToggleActivate() diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_timestop.dm b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_timestop.dm index 996f97ad9c2..e81d6575dfc 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_timestop.dm +++ b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_timestop.dm @@ -32,8 +32,7 @@ /datum/artifact_effect/timestop/Destroy() fall = null - qdel(caster) - caster = null + QDEL_NULL(caster) ..() /datum/artifact_effect/timestop/DoEffectTouch(var/mob/user) @@ -47,4 +46,4 @@ /datum/artifact_effect/timestop/proc/stop_time() caster.forceMove(get_turf(holder)) fall.perform(caster, skipcharge = 1) - caster.forceMove(null) \ No newline at end of file + caster.forceMove(null) diff --git a/code/modules/research/xenoarchaeology/artifact/triggers/unknown_trigger_electricity.dm b/code/modules/research/xenoarchaeology/artifact/triggers/unknown_trigger_electricity.dm index e3b1828def6..62e62faced0 100644 --- a/code/modules/research/xenoarchaeology/artifact/triggers/unknown_trigger_electricity.dm +++ b/code/modules/research/xenoarchaeology/artifact/triggers/unknown_trigger_electricity.dm @@ -12,8 +12,7 @@ /datum/artifact_trigger/electricity/Destroy() if(power_connection) - qdel(power_connection) - power_connection = null + QDEL_NULL(power_connection) . = ..() /datum/artifact_trigger/electricity/CheckTrigger() @@ -25,10 +24,10 @@ if(my_effect.activated) Triggered(0, "NOCABLE", 0) return - + power_connection.connect(cable) var/datum/powernet/PN = power_connection.get_powernet() - + if(!PN) //Powernet is dead power_requested = FALSE if(my_effect.activated) diff --git a/code/modules/research/xenoarchaeology/finds/finds.dm b/code/modules/research/xenoarchaeology/finds/finds.dm index 6e069c72943..c194d4c08a6 100644 --- a/code/modules/research/xenoarchaeology/finds/finds.dm +++ b/code/modules/research/xenoarchaeology/finds/finds.dm @@ -1121,8 +1121,7 @@ /obj/item/weapon/strangerock/Destroy() ..() - qdel(inside) - inside = null + QDEL_NULL(inside) /*/obj/item/weapon/strangerock/ex_act(var/severity) if(severity && prob(30)) diff --git a/code/modules/research/xenoarchaeology/finds/finds_fossils.dm b/code/modules/research/xenoarchaeology/finds/finds_fossils.dm index 9aa40438d6f..d487427c5a0 100644 --- a/code/modules/research/xenoarchaeology/finds/finds_fossils.dm +++ b/code/modules/research/xenoarchaeology/finds/finds_fossils.dm @@ -37,8 +37,7 @@ var/b = new src.type o.contents.Add(a) o.contents.Add(b) - qdel (W) - W = null + QDEL_NULL (W) qdel (src) /obj/structure/skeleton @@ -60,8 +59,7 @@ if(!bstate) bnum++ src.contents.Add(new/obj/item/weapon/fossil/bone) - qdel (W) - W = null + QDEL_NULL (W) if(bnum==breq) usr = user icon_state = "skel" diff --git a/code/modules/research/xenoarchaeology/machinery/artifact_harvester.dm b/code/modules/research/xenoarchaeology/machinery/artifact_harvester.dm index 6800ed2d37b..a280bb5c22f 100644 --- a/code/modules/research/xenoarchaeology/machinery/artifact_harvester.dm +++ b/code/modules/research/xenoarchaeology/machinery/artifact_harvester.dm @@ -59,8 +59,7 @@ owned_scanner.harvester_console = null owned_scanner = null if (artifact_field) - qdel(artifact_field) - artifact_field = null + QDEL_NULL(artifact_field) ..() /obj/machinery/artifact_harvester/proc/reconnect_scanner() @@ -203,8 +202,7 @@ //see if we can clear out an old effect //delete it when the ids match to account for duplicate ids having different effects if(inserted_battery.battery_effect && inserted_battery.stored_charge <= 0) - qdel(inserted_battery.battery_effect) - inserted_battery.battery_effect = null + QDEL_NULL(inserted_battery.battery_effect) //only charge up var/matching_id = 0 @@ -252,8 +250,7 @@ //see if we can clear out an old effect //delete it when the ids match to account for duplicate ids having different effects if(inserted_battery.battery_effect && inserted_battery.stored_charge <= 0) - qdel(inserted_battery.battery_effect) - inserted_battery.battery_effect = null + QDEL_NULL(inserted_battery.battery_effect) //only charge up var/matching_id = 0 @@ -342,8 +339,7 @@ if (href_list["alockoff"]) if (artifact_field) src.visible_message("[bicon(owned_scanner)] [owned_scanner] deactivates with a gentle shudder.") - qdel(artifact_field) - artifact_field = null + QDEL_NULL(artifact_field) if(cur_artifact) cur_artifact.anchored = 0 cur_artifact.being_used = 0 diff --git a/code/modules/research/xenoarchaeology/tools/ano_device_battery.dm b/code/modules/research/xenoarchaeology/tools/ano_device_battery.dm index 60b24c6232e..2b069cdc383 100644 --- a/code/modules/research/xenoarchaeology/tools/ano_device_battery.dm +++ b/code/modules/research/xenoarchaeology/tools/ano_device_battery.dm @@ -303,6 +303,5 @@ var/list/anomaly_power_utilizers = list() processing_objects.Remove(src) anomaly_power_utilizers -= src if (inserted_battery) - qdel(inserted_battery) - inserted_battery = null + QDEL_NULL(inserted_battery) ..() diff --git a/code/modules/research/xenoarchaeology/tools/anomaly_container.dm b/code/modules/research/xenoarchaeology/tools/anomaly_container.dm index 75bafc65b5d..02d32ab650f 100644 --- a/code/modules/research/xenoarchaeology/tools/anomaly_container.dm +++ b/code/modules/research/xenoarchaeology/tools/anomaly_container.dm @@ -13,11 +13,9 @@ /obj/structure/anomaly_container/Destroy() if (contained) - qdel(contained) - contained = null + QDEL_NULL(contained) if (report) - qdel(report) - report = null + QDEL_NULL(report) ..() diff --git a/code/modules/research/xenoarchaeology/tools/suspension_generator.dm b/code/modules/research/xenoarchaeology/tools/suspension_generator.dm index 4e7948086ab..c4fe6304c80 100644 --- a/code/modules/research/xenoarchaeology/tools/suspension_generator.dm +++ b/code/modules/research/xenoarchaeology/tools/suspension_generator.dm @@ -334,8 +334,7 @@ M.SetStunned(min(M.stunned, 3)) src.visible_message("[bicon(src)] \the [src] deactivates with a gentle shudder.") - qdel(suspension_field) - suspension_field = null + QDEL_NULL(suspension_field) icon_state = "suspension2" /obj/machinery/suspension_gen/Destroy() diff --git a/code/modules/research/xenoarchaeology/tools/tools_coresampler.dm b/code/modules/research/xenoarchaeology/tools/tools_coresampler.dm index fdc46111528..dfbb96e066a 100644 --- a/code/modules/research/xenoarchaeology/tools/tools_coresampler.dm +++ b/code/modules/research/xenoarchaeology/tools/tools_coresampler.dm @@ -26,8 +26,7 @@ /obj/item/device/core_sampler/Destroy() if (extracted) - qdel(extracted) - extracted = null + QDEL_NULL(extracted) ..() /obj/item/device/core_sampler/examine(mob/user) diff --git a/code/modules/research/xenoarchaeology/tools/tools_depthscanner.dm b/code/modules/research/xenoarchaeology/tools/tools_depthscanner.dm index 95ded18af26..19ba072dff4 100644 --- a/code/modules/research/xenoarchaeology/tools/tools_depthscanner.dm +++ b/code/modules/research/xenoarchaeology/tools/tools_depthscanner.dm @@ -134,15 +134,13 @@ if(index <= positive_locations.len) var/datum/depth_scan/D = positive_locations[index] positive_locations.Remove(D) - qdel(D) - D = null + QDEL_NULL(D) else //GC will hopefully pick them up before too long positive_locations = list() - qdel(current) - current = null + QDEL_NULL(current) else if(href_list["close"]) usr.unset_machine() usr << browse(null, "window=depth_scanner") - updateSelfDialog() \ No newline at end of file + updateSelfDialog() diff --git a/code/modules/spacepods/construction.dm b/code/modules/spacepods/construction.dm index 8c1e897f94e..56a08461492 100644 --- a/code/modules/spacepods/construction.dm +++ b/code/modules/spacepods/construction.dm @@ -20,8 +20,7 @@ dir = EAST /obj/structure/spacepod_frame/Destroy() - qdel(construct) - construct = null + QDEL_NULL(construct) ..() /obj/structure/spacepod_frame/attack_hand() @@ -38,8 +37,7 @@ /obj/structure/spacepod_frame/unarmored/New() ..() - qdel(construct) - construct = null + QDEL_NULL(construct) /obj/structure/spacepod_frame/unarmored/attackby(obj/item/W, mob/user) if(!construct || !construct.action(W, user)) diff --git a/code/modules/spacepods/spacepods.dm b/code/modules/spacepods/spacepods.dm index 44fe2b38ea0..49c530cf3cb 100644 --- a/code/modules/spacepods/spacepods.dm +++ b/code/modules/spacepods/spacepods.dm @@ -92,29 +92,18 @@ for(var/mob/living/L in occupants) move_outside(L) L.gib() - if(actions.len) - for(var/datum/action/A in actions) - actions.Remove(A) - qdel(A) - qdel(pr_int_temp_processor) - pr_int_temp_processor = null - qdel(pr_give_air) - pr_give_air = null - qdel(pr_lights_battery_use) - pr_lights_battery_use = null - qdel(ES) - ES = null - qdel(battery) - battery = null - qdel(cabin_air) - cabin_air = null - qdel(ion_trail) - ion_trail = null + QDEL_LIST_NULL(actions) + QDEL_NULL(pr_int_temp_processor) + QDEL_NULL(pr_give_air) + QDEL_NULL(pr_lights_battery_use) + QDEL_NULL(ES) + QDEL_NULL(battery) + QDEL_NULL(cabin_air) + QDEL_NULL(ion_trail) qdel(pod_overlays[DAMAGE]) qdel(pod_overlays[FIRE]) pod_overlays = null - qdel(internal_tank) - internal_tank = null + QDEL_NULL(internal_tank) ..() /obj/spacepod/proc/update_icons() @@ -175,8 +164,7 @@ move_outside(H, get_turf(src)) H.ex_act(severity + 1) to_chat(H, "You are forcefully thrown from \the [src]!") - qdel(ion_trail) - ion_trail = null // Should be nulled by qdel src in next line but OH WELL + QDEL_NULL(ion_trail) // Should be nulled by qdel src in next line but OH WELL qdel(src) if(2) adjust_health(100) diff --git a/code/modules/spells/aoe_turf/charge.dm b/code/modules/spells/aoe_turf/charge.dm index 92f73b40bb3..a7c04201faf 100644 --- a/code/modules/spells/aoe_turf/charge.dm +++ b/code/modules/spells/aoe_turf/charge.dm @@ -50,8 +50,7 @@ var/obj/item/weapon/spellbook/oneuse/I = target if(prob(50)) I.visible_message("[I] catches fire!") - qdel(I) - I = null + QDEL_NULL(I) else I.used = 0 charged_item = I diff --git a/code/modules/spells/aoe_turf/conjure/conjure.dm b/code/modules/spells/aoe_turf/conjure/conjure.dm index e934316d2c4..fd29d343de6 100644 --- a/code/modules/spells/aoe_turf/conjure/conjure.dm +++ b/code/modules/spells/aoe_turf/conjure/conjure.dm @@ -91,8 +91,7 @@ How they spawn stuff is decided by behaviour vars, which are explained below return /spell/aoe_turf/conjure/proc/conjure_animation(var/atom/movable/overlay/animation, var/turf/target) - qdel(animation) - animation = null + QDEL_NULL(animation) /spell/aoe_turf/conjure/choice var/input_message = "What would you like to spawn?" diff --git a/code/modules/spells/aoe_turf/conjure/construct.dm b/code/modules/spells/aoe_turf/conjure/construct.dm index b6ec8f88d10..51aebe85012 100644 --- a/code/modules/spells/aoe_turf/conjure/construct.dm +++ b/code/modules/spells/aoe_turf/conjure/construct.dm @@ -71,8 +71,7 @@ flick("cultfloor",animation) shadow(target,holder.loc,"artificer_convert") spawn(10) - qdel(animation) - animation = null + QDEL_NULL(animation) /spell/aoe_turf/conjure/wall name = "Conjure Wall" @@ -110,8 +109,7 @@ flick("cultwall",animation) shadow(target,holder.loc,"artificer_convert") spawn(10) - qdel(animation) - animation = null + QDEL_NULL(animation) /spell/aoe_turf/conjure/door name = "Conjure Door" @@ -137,8 +135,7 @@ flick("",animation) shadow(target,holder.loc,"artificer_convert") spawn(10) - qdel(animation) - animation = null + QDEL_NULL(animation) /spell/aoe_turf/conjure/wall/reinforced//what? name = "Greater Construction" diff --git a/code/modules/spells/changeling/lesser_form.dm b/code/modules/spells/changeling/lesser_form.dm index 4a11a1f7aba..cce1630bef9 100644 --- a/code/modules/spells/changeling/lesser_form.dm +++ b/code/modules/spells/changeling/lesser_form.dm @@ -113,8 +113,7 @@ var/anim_name = M.get_unmonkey_anim() flick(anim_name, animation) sleep(20) - qdel(animation) - animation = null + QDEL_NULL(animation) var/mob/living/carbon/human/O = new /mob/living/carbon/human( user, delay_ready_dna=1 ) if (M.dna.GetUIState(DNA_UI_GENDER)) diff --git a/code/modules/spells/changeling/split.dm b/code/modules/spells/changeling/split.dm index fe394a78061..bacbd04f47e 100644 --- a/code/modules/spells/changeling/split.dm +++ b/code/modules/spells/changeling/split.dm @@ -13,11 +13,10 @@ var/datum/mind/owner = null // The mind of the user, to be used by the recruiter var/datum/recruiter/recruiter = null var/polling_ghosts = FALSE - + /spell/changeling/split/Destroy() owner = null - qdel(recruiter) - recruiter = null + QDEL_NULL(recruiter) ..() /spell/changeling/split/cast(var/list/targets, var/mob/living/carbon/human/user) @@ -65,7 +64,7 @@ /spell/changeling/split/proc/recruiter_recruited(mob/dead/observer/player) if(!player) - checkSplit(FALSE) + checkSplit(FALSE) polling_ghosts = FALSE qdel(recruiter) return @@ -97,9 +96,9 @@ newChangeling.ForgeObjectives() newChangeling.Greet(GREET_DEFAULT) - + checkSplit(TRUE) //handles counting splits update_faction_icons() feedback_add_details("changeling_powers","SP") - qdel(recruiter) \ No newline at end of file + qdel(recruiter) diff --git a/code/modules/spells/spell_code.dm b/code/modules/spells/spell_code.dm index 689fdc0b1a1..eef14468ff9 100644 --- a/code/modules/spells/spell_code.dm +++ b/code/modules/spells/spell_code.dm @@ -346,8 +346,7 @@ var/list/spells = typesof(/spell) //needed for the badmin verb for now spell.anchored = 1 spell.setDensity(FALSE) spawn(overlay_lifespan) - qdel(spell) - spell = null + QDEL_NULL(spell) return valid_targets /spell/proc/after_cast(list/targets) diff --git a/code/modules/supermatter/supermatter.dm b/code/modules/supermatter/supermatter.dm index 56b54889c1e..f4341d792bb 100644 --- a/code/modules/supermatter/supermatter.dm +++ b/code/modules/supermatter/supermatter.dm @@ -130,8 +130,7 @@ /obj/machinery/power/supermatter/Destroy() new /datum/artifact_postmortem_data(src,TRUE)//we only archive those that were excavated - qdel(radio) - radio = null + QDEL_NULL(radio) radio_controller.remove_object(src, frequency) radio_connection = null . = ..() diff --git a/code/modules/telesci/rcs.dm b/code/modules/telesci/rcs.dm index ec0e65deafc..eb4693f4aa4 100644 --- a/code/modules/telesci/rcs.dm +++ b/code/modules/telesci/rcs.dm @@ -98,8 +98,7 @@ /obj/item/weapon/rcs/Destroy() if (cell) - qdel(cell) - cell = null + QDEL_NULL(cell) ..() /obj/item/weapon/rcs/attack_self(mob/user) diff --git a/code/modules/telesci/telesci_computer.dm b/code/modules/telesci/telesci_computer.dm index cf2b7321f0c..ada68774922 100644 --- a/code/modules/telesci/telesci_computer.dm +++ b/code/modules/telesci/telesci_computer.dm @@ -313,8 +313,7 @@ var/list/telesci_warnings = list( return if(prob(25)) - qdel(telepad.amplifier) - telepad.amplifier = null + QDEL_NULL(telepad.amplifier) src.visible_message("[bicon(src)]You hear something shatter.","[bicon(src)]You hear something shatter.") spark(telepad, 5) diff --git a/code/modules/tgui/tgui_alert.dm b/code/modules/tgui/tgui_alert.dm index d1b1f792d7b..7a895b817b5 100644 --- a/code/modules/tgui/tgui_alert.dm +++ b/code/modules/tgui/tgui_alert.dm @@ -88,8 +88,7 @@ /datum/tgui_modal/Destroy(force, ...) SStgui.close_uis(src) - qdel(buttons) - buttons = null + QDEL_NULL(buttons) . = ..() /** @@ -153,8 +152,7 @@ src.callback = callback /datum/tgui_modal/async/Destroy(force, ...) - qdel(callback) - callback = null + QDEL_NULL(callback) . = ..() /datum/tgui_modal/async/set_choice(choice) diff --git a/code/modules/tgui/tgui_input_list.dm b/code/modules/tgui/tgui_input_list.dm index a39a216809d..3354d283aae 100644 --- a/code/modules/tgui/tgui_input_list.dm +++ b/code/modules/tgui/tgui_input_list.dm @@ -105,8 +105,7 @@ /datum/tgui_list_input/Destroy() SStgui.close_uis(src) - qdel(buttons) - buttons = null + QDEL_NULL(buttons) . = ..() /** @@ -175,8 +174,7 @@ src.callback = callback /datum/tgui_list_input/async/Destroy(force, ...) - qdel(callback) - callback = null + QDEL_NULL(callback) . = ..() /datum/tgui_list_input/async/set_choice(choice) diff --git a/code/modules/trader/crates/alcatrazfour.dm b/code/modules/trader/crates/alcatrazfour.dm index 323434e3eb3..8d96e424ad0 100644 --- a/code/modules/trader/crates/alcatrazfour.dm +++ b/code/modules/trader/crates/alcatrazfour.dm @@ -53,8 +53,7 @@ var/global/list/alcatraz_stuff = list( /obj/item/clothing/head/helmet/stun/Destroy() if (bcell) - qdel(bcell) - bcell = null + QDEL_NULL(bcell) return ..() @@ -117,8 +116,7 @@ var/global/list/alcatraz_stuff = list( S = new(src) /obj/item/clothing/accessory/bangerboy/Destroy() - qdel(S) - S = null + QDEL_NULL(S) ..() /obj/item/clothing/accessory/bangerboy/attackby(obj/item/W, mob/user) @@ -543,8 +541,7 @@ var/global/list/alcatraz_stuff = list( /obj/item/weapon/autocuffer/Destroy() if(stored) - qdel(stored) - stored = null + QDEL_NULL(stored) ..() /obj/item/weapon/autocuffer/restraint_apply_intent_check(mob/user) diff --git a/code/modules/trader/crates/cloudnine.dm b/code/modules/trader/crates/cloudnine.dm index 0a2b507637d..b0d7031a9e8 100644 --- a/code/modules/trader/crates/cloudnine.dm +++ b/code/modules/trader/crates/cloudnine.dm @@ -320,8 +320,7 @@ var/list/omnitoolable = list(/obj/machinery/alarm,/obj/machinery/power/apc) return //nothing to exhale if(istype(S)) air_contents.merge(removed) - qdel(removed) - removed = null + QDEL_NULL(removed) visible_message("\The [src] [wielded ? "in" : "ex"]hales.") playsound(loc, 'sound/effects/spray.ogg', 50, 1) var/image/void = image('icons/effects/effects.dmi',user ? user : src,"bhole3") diff --git a/code/modules/unit_tests/reagent_recipe_collisions.dm b/code/modules/unit_tests/reagent_recipe_collisions.dm index a613fbd0968..d339e91076b 100644 --- a/code/modules/unit_tests/reagent_recipe_collisions.dm +++ b/code/modules/unit_tests/reagent_recipe_collisions.dm @@ -2,8 +2,7 @@ /datum/unit_test/reagent_recipe_collisions/start() var/datum/reagents/r = new // Builds chemical_reactions_list - qdel(r) - r = null + QDEL_NULL(r) var/list/reactions = list() for(var/V in global.chemical_reactions_list) reactions += global.chemical_reactions_list[V] diff --git a/code/modules/virus2/diseasesplicer.dm b/code/modules/virus2/diseasesplicer.dm index 9acd6afc638..f2fae5ecccd 100644 --- a/code/modules/virus2/diseasesplicer.dm +++ b/code/modules/virus2/diseasesplicer.dm @@ -232,8 +232,7 @@ break scanning = DISEASE_SPLICER_SCANNING_TICKS analysed = dish.analysed - qdel(dish) - dish = null + QDEL_NULL(dish) update_icon() anim(target = src, a_icon = icon, flick_anim = "splicer_scan", sleeptime = 15) diff --git a/code/modules/virus2/effect/stage_4.dm b/code/modules/virus2/effect/stage_4.dm index 75c9ab4fe37..add9a66c5b3 100644 --- a/code/modules/virus2/effect/stage_4.dm +++ b/code/modules/virus2/effect/stage_4.dm @@ -894,8 +894,7 @@ H.my_appearance.b_eyes = old_b_eyes H.update_body() if (beam) - qdel(beam) - beam = null + QDEL_NULL(beam) if (emitter) emitter.unregister_event(/event/before_move, src, /datum/disease2/effect/emitter/proc/update_emitter_start) emitter.unregister_event(/event/after_move, src, /datum/disease2/effect/emitter/proc/update_emitter_end) @@ -908,8 +907,7 @@ /datum/disease2/effect/emitter/on_death(var/mob/living/carbon/mob) if (beam) - qdel(beam) - beam = null + QDEL_NULL(beam) /datum/disease2/effect/emitter/proc/ready() if (!emitter || !isturf(emitter.loc) || emitter.lying || emitter.stat != CONSCIOUS) @@ -943,8 +941,7 @@ /datum/disease2/effect/emitter/proc/update_emitter() if (!ready()) if (beam) - qdel(beam) - beam = null + QDEL_NULL(beam) return if (!beam) if (!ismouse(emitter)) @@ -966,8 +963,7 @@ /datum/disease2/effect/emitter/proc/update_emitter_start() if (beam) - qdel(beam) - beam = null + QDEL_NULL(beam) /datum/disease2/effect/emitter/proc/update_emitter_end() if (!ready()) @@ -1181,7 +1177,7 @@ F.melee_damage_lower = 20 F.melee_damage_upper = 20 F.name = H.name - qdel(H) + qdel(H) flick("cult_jaunt_land",landing_animation) return @@ -1193,5 +1189,5 @@ H.update_mutantrace() H.update_body() H.handle_regular_hud_updates() - + diff --git a/maps/randomvaults/mothership_lab.dm b/maps/randomvaults/mothership_lab.dm index 96bcd50bac2..33898eaadb0 100644 --- a/maps/randomvaults/mothership_lab.dm +++ b/maps/randomvaults/mothership_lab.dm @@ -634,8 +634,7 @@ /obj/item/weapon/melee/stunprobe/Destroy() if (bcell) - qdel(bcell) - bcell = null + QDEL_NULL(bcell) return ..() @@ -1068,8 +1067,7 @@ /obj/machinery/acidshower/update_icon() //This handles the acid overlay when the shower is on, and makes the vapor appear after a while overlays.len = 0 if(myvapor) - qdel(myvapor) - myvapor = null + QDEL_NULL(myvapor) if(on) var/image/acid = image('icons/obj/acidcloset.dmi', src, "acid", BELOW_OBJ_LAYER, dir) @@ -1090,8 +1088,7 @@ myvapor = new /obj/effect/acidvapor(get_turf(src)) spawn(250) if(src && !on) - qdel(myvapor) - myvapor = null + QDEL_NULL(myvapor) isvapor = 0 /obj/machinery/acidshower/Crossed(atom/movable/O) diff --git a/maps/randomvaults/sokoban.dm b/maps/randomvaults/sokoban.dm index 4e1db21a182..d8531a41052 100644 --- a/maps/randomvaults/sokoban.dm +++ b/maps/randomvaults/sokoban.dm @@ -74,8 +74,7 @@ cheater_trophy.name = "cheater's trophy" cheater_trophy.desc = "No prize for you!" - qdel(L.reward) - L.reward = null + QDEL_NULL(L.reward) if(!cheated) if(usr) diff --git a/vgstation13.dme b/vgstation13.dme index ccc4b2143ea..682819dc347 100644 --- a/vgstation13.dme +++ b/vgstation13.dme @@ -56,6 +56,7 @@ #include "__DEFINES\power.dm" #include "__DEFINES\preferences.dm" #include "__DEFINES\profile.dm" +#include "__DEFINES\qdel.dm" #include "__DEFINES\rcd.dm" #include "__DEFINES\reagents.dm" #include "__DEFINES\research_levels.dm"