diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm index d309cc37e0f..75fa0d9b448 100644 --- a/code/_onclick/hud/human.dm +++ b/code/_onclick/hud/human.dm @@ -44,8 +44,7 @@ /mob/living/carbon/human/proc/remake_hud() //used for preference changes mid-round; can't change hud icons without remaking the hud. if(hud_used) - qdel(hud_used) - hud_used = null + QDEL_NULL(hud_used) create_mob_hud() if(hud_used) hud_used.show_hud(hud_used.hud_version) diff --git a/code/game/dna/genes/monkey.dm b/code/game/dna/genes/monkey.dm index 4f023d8021f..bae2c22a95c 100644 --- a/code/game/dna/genes/monkey.dm +++ b/code/game/dna/genes/monkey.dm @@ -43,8 +43,7 @@ H.set_species(H.species.primitive_form) if(H.hud_used) - qdel(H.hud_used) - H.hud_used = null + QDEL_NULL(H.hud_used) if(H.client) H.hud_used = new /datum/hud/monkey(H, ui_style2icon(H.client.prefs.UI_style), H.client.prefs.UI_style_color, H.client.prefs.UI_style_alpha) @@ -90,12 +89,11 @@ H.name = H.real_name if(H.hud_used) - qdel(H.hud_used) - H.hud_used = null + QDEL_NULL(H.hud_used) if(H.client) H.hud_used = new /datum/hud/human(H, ui_style2icon(H.client.prefs.UI_style), H.client.prefs.UI_style_color, H.client.prefs.UI_style_alpha) to_chat(H, "You are now a [H.species.name].") - return H \ No newline at end of file + return H diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm index f3191491c88..2599bea7e5a 100644 --- a/code/game/gamemodes/gameticker.dm +++ b/code/game/gamemodes/gameticker.dm @@ -328,8 +328,7 @@ var/round_start_time = 0 //Otherwise if its a verb it will continue on afterwards. spawn(300) if(cinematic) - qdel(cinematic) //end the cinematic - cinematic = null + QDEL_NULL(cinematic) //end the cinematic if(temp_buckle) qdel(temp_buckle) //release everybody diff --git a/code/game/gamemodes/miniantags/slaughter/bloodcrawl.dm b/code/game/gamemodes/miniantags/slaughter/bloodcrawl.dm index 73165079b6e..a6b083d5b72 100644 --- a/code/game/gamemodes/miniantags/slaughter/bloodcrawl.dm +++ b/code/game/gamemodes/miniantags/slaughter/bloodcrawl.dm @@ -132,8 +132,7 @@ playsound(get_turf(src), 'sound/misc/exit_blood.ogg', 100, 1, -1) flick("jauntup",animation) - qdel(holder) - holder = null + QDEL_NULL(holder) if(iscarbon(src)) var/mob/living/carbon/C = src @@ -171,4 +170,4 @@ return /obj/effect/dummy/slaughter/singularity_act() - return \ No newline at end of file + return diff --git a/code/game/gamemodes/vampire/vampire.dm b/code/game/gamemodes/vampire/vampire.dm index 406f21bdcdb..00c99e76f29 100644 --- a/code/game/gamemodes/vampire/vampire.dm +++ b/code/game/gamemodes/vampire/vampire.dm @@ -338,8 +338,7 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha vampire_mind.current.create_attack_log("De-vampired") if(vampire_mind.vampire) vampire_mind.vampire.remove_vampire_powers() - qdel(vampire_mind.vampire) - vampire_mind.vampire = null + QDEL_NULL(vampire_mind.vampire) if(issilicon(vampire_mind.current)) to_chat(vampire_mind.current, "You have been turned into a robot! You can feel your powers fading away...") else @@ -455,6 +454,5 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha return static_inventory -= vampire_blood_display - qdel(vampire_blood_display) - vampire_blood_display = null + QDEL_NULL(vampire_blood_display) show_hud(hud_version) diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index 4f3e7fe9001..c97b3ac9445 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -78,8 +78,7 @@ if(initial(S.name) == initial(aspell.name)) spell_levels = aspell.spell_level user.mind.spell_list.Remove(aspell) - qdel(S) - S = null + QDEL_NULL(S) return cost * (spell_levels+1) return -1 diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index 7c2df327285..06f4d60c702 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -199,8 +199,7 @@ active2.fields["b_type"] = "O+" if("del_r2") if(active2) - qdel(active2) - active2 = null + QDEL_NULL(active2) if(href_list["scan"]) if(scan) @@ -565,4 +564,4 @@ #undef MED_DATA_MAINT #undef MED_DATA_RECORD #undef MED_DATA_V_DATA -#undef MED_DATA_MEDBOT \ No newline at end of file +#undef MED_DATA_MEDBOT diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index fca20841cfa..7147612e9dc 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -156,11 +156,9 @@ 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) - qdel(active1) - active1 = null + QDEL_NULL(active1) if(active2) - qdel(active2) - active2 = null + QDEL_NULL(active2) update_all_mob_security_hud() screen = SEC_DATA_R_LIST if("criminal") @@ -556,4 +554,4 @@ #undef SEC_DATA_R_LIST #undef SEC_DATA_MAINT -#undef SEC_DATA_RECORD \ No newline at end of file +#undef SEC_DATA_RECORD diff --git a/code/game/machinery/computer/skills.dm b/code/game/machinery/computer/skills.dm index e98028e3807..66d0bfdbaee 100644 --- a/code/game/machinery/computer/skills.dm +++ b/code/game/machinery/computer/skills.dm @@ -111,8 +111,7 @@ 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) - qdel(active1) - active1 = null + QDEL_NULL(active1) screen = SKILL_DATA_R_LIST if("rank") if(active1) @@ -322,4 +321,4 @@ #undef SKILL_DATA_R_LIST #undef SKILL_DATA_MAINT -#undef SKILL_DATA_RECORD \ No newline at end of file +#undef SKILL_DATA_RECORD diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 1e31207b574..13d1d7505de 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -317,8 +317,7 @@ if(istype(W,/obj/item/device/pda)) var/obj/item/device/pda/P = W if(P.id) - qdel(P.id) - P.id = null + QDEL_NULL(P.id) qdel(P) if(!preserve) @@ -421,8 +420,7 @@ occupant.ghostize(0) // Players despawned too early may not re-enter the game else occupant.ghostize(1) - qdel(occupant) - occupant = null + QDEL_NULL(occupant) name = initial(name) diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index aa345e29643..6cb866d27ed 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -142,8 +142,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/ /obj/machinery/hologram/holopad/proc/clear_holo() // hologram.set_light(0)//Clear lighting. //handled by the lighting controller when its ower is deleted - qdel(hologram)//Get rid of hologram. - hologram = null + QDEL_NULL(hologram)//Get rid of hologram. if(master.holo == src) master.holo = null master = null//Null the master, since no-one is using it now. diff --git a/code/game/machinery/washing_machine.dm b/code/game/machinery/washing_machine.dm index e27a97c796c..c73d72d0c2d 100644 --- a/code/game/machinery/washing_machine.dm +++ b/code/game/machinery/washing_machine.dm @@ -172,8 +172,7 @@ H.item_color = wash_color H.name = new_softcap_name H.desc = new_desc - qdel(crayon) - crayon = null + QDEL_NULL(crayon) if( locate(/mob,contents) ) diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm index 1cd105367ed..6cf11f4f3c8 100644 --- a/code/game/objects/effects/effect_system.dm +++ b/code/game/objects/effects/effect_system.dm @@ -440,8 +440,7 @@ steam.start() -- spawns the effect var/obj/chemholder Destroy() - qdel(chemholder) - chemholder = null + QDEL_NULL(chemholder) return ..() New() diff --git a/code/game/objects/items/devices/chameleonproj.dm b/code/game/objects/items/devices/chameleonproj.dm index ff7eb0ac2cc..eef0b2072b8 100644 --- a/code/game/objects/items/devices/chameleonproj.dm +++ b/code/game/objects/items/devices/chameleonproj.dm @@ -43,8 +43,7 @@ if(active_dummy) eject_all() playsound(get_turf(src), 'sound/effects/pop.ogg', 100, 1, -6) - qdel(active_dummy) - active_dummy = null + QDEL_NULL(active_dummy) to_chat(usr, "You deactivate \the [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/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm index c5ecb18edec..1f8cb43fbb2 100644 --- a/code/game/objects/items/robot/robot_upgrades.dm +++ b/code/game/objects/items/robot/robot_upgrades.dm @@ -37,8 +37,7 @@ R.hands.icon_state = "nomod" R.icon_state = "robot" R.module.remove_subsystems_and_actions(R) - qdel(R.module) - R.module = null + QDEL_NULL(R.module) R.camera.network.Remove(list("Engineering", "Medical", "Mining Outpost")) R.rename_character(R.real_name, R.get_default_name("Default")) diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 83b6d31a0ea..e97fdb70958 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -1288,8 +1288,7 @@ obj/item/toy/cards/deck/syndicate/black if(stored_minature) to_chat(user, "\The [src] makes a violent grinding noise as it tears apart the miniature figure inside!") - qdel(stored_minature) - stored_minature = null + QDEL_NULL(stored_minature) playsound(user, 'sound/goonstation/effects/gib.ogg', 20, 1) cooldown = world.time diff --git a/code/game/objects/items/weapons/defib.dm b/code/game/objects/items/weapons/defib.dm index 8705b86ea3a..5ac4495ce32 100644 --- a/code/game/objects/items/weapons/defib.dm +++ b/code/game/objects/items/weapons/defib.dm @@ -350,8 +350,7 @@ H.key = ghost.key log_runtime(EXCEPTION("Ghost of name [ghost.name] is bound to [H.real_name], but lacks a client. Deleting ghost."), src) - qdel(ghost) - ghost = null + QDEL_NULL(ghost) var/tplus = world.time - H.timeofdeath var/tlimit = 1800 //past this much time the patient is unrecoverable (in deciseconds) var/tloss = 600 //brain damage starts setting in on the patient after some time left rotting @@ -500,8 +499,7 @@ H.key = ghost.key log_runtime(EXCEPTION("Ghost of name [ghost.name] is bound to [H.real_name], but lacks a client. Deleting ghost."), H) - qdel(ghost) - ghost = null + QDEL_NULL(ghost) var/tplus = world.time - H.timeofdeath var/tlimit = 1800 //past this much time the patient is unrecoverable (in deciseconds) var/tloss = 600 //brain damage starts setting in on the patient after some time left rotting diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index 8aabce1eb54..2f57e9157ee 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -241,8 +241,7 @@ /obj/item/weapon/wirecutters/attack(mob/living/carbon/C, mob/user) if(istype(C) && C.handcuffed && istype(C.handcuffed, /obj/item/weapon/restraints/handcuffs/cable)) user.visible_message("[user] cuts [C]'s restraints with [src]!") - qdel(C.handcuffed) - C.handcuffed = null + QDEL_NULL(C.handcuffed) if(C.buckled && C.buckled.buckle_requires_restraints) C.buckled.unbuckle_mob(C) C.update_handcuffed() diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index 596673ba0c7..540c2e079aa 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -102,8 +102,7 @@ if(!( A.anchored )) A.forceMove(src) playsound(loc, open_sound, 50, 1) - qdel(connected) - connected = null + QDEL_NULL(connected) else playsound(loc, open_sound, 50, 1) connected = new /obj/structure/m_tray( loc ) @@ -118,8 +117,7 @@ connected.icon_state = "morguet" connected.dir = dir else - qdel(connected) - connected = null + QDEL_NULL(connected) add_fingerprint(user) update() return @@ -155,8 +153,7 @@ A.forceMove(connected.loc) connected.icon_state = "morguet" else - qdel(connected) - connected = null + QDEL_NULL(connected) return /obj/structure/morgue/Destroy() @@ -306,8 +303,7 @@ if(!( A.anchored )) A.forceMove(src) playsound(loc, open_sound, 50, 1) - qdel(connected) - connected = null + QDEL_NULL(connected) else if(locked == 0) playsound(loc, open_sound, 50, 1) connected = new /obj/structure/c_tray( loc ) @@ -321,8 +317,7 @@ A.forceMove(connected.loc) connected.icon_state = "cremat" else - qdel(connected) - connected = null + QDEL_NULL(connected) add_fingerprint(user) update() @@ -355,8 +350,7 @@ A.forceMove(connected.loc) connected.icon_state = "cremat" else - qdel(connected) - connected = null + QDEL_NULL(connected) return /obj/structure/crematorium/proc/cremate(mob/user as mob) diff --git a/code/game/objects/structures/stool_bed_chair_nest/bed.dm b/code/game/objects/structures/stool_bed_chair_nest/bed.dm index 56c6861e4fc..1e5151dd1bd 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/bed.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/bed.dm @@ -139,5 +139,4 @@ to_chat(user, "You deploy the roller bed.") var/obj/structure/stool/bed/roller/R = new /obj/structure/stool/bed/roller(user.loc) R.add_fingerprint(user) - qdel(held) - held = null + QDEL_NULL(held) diff --git a/code/modules/admin/buildmode.dm b/code/modules/admin/buildmode.dm index f246357e472..d628df054c6 100644 --- a/code/modules/admin/buildmode.dm +++ b/code/modules/admin/buildmode.dm @@ -376,10 +376,8 @@ return 1 /datum/click_intercept/buildmode/proc/deselect_region() - qdel(cornerA) - cornerA = null - qdel(cornerB) - cornerB = null + QDEL_NULL(cornerA) + QDEL_NULL(cornerB) /datum/click_intercept/buildmode/proc/Reset()//Reset temporary variables deselect_region() diff --git a/code/modules/clothing/spacesuits/rig/modules/computer.dm b/code/modules/clothing/spacesuits/rig/modules/computer.dm index 468141b6628..fed2dbce22a 100644 --- a/code/modules/clothing/spacesuits/rig/modules/computer.dm +++ b/code/modules/clothing/spacesuits/rig/modules/computer.dm @@ -165,11 +165,9 @@ to_chat(user, "You purge the remaining scraps of data from your previous AI, freeing it for use.") if(integrated_ai) integrated_ai.ghostize() - qdel(integrated_ai) - integrated_ai = null + QDEL_NULL(integrated_ai) if(ai_card) - qdel(ai_card) - ai_card = null + QDEL_NULL(ai_card) else if(user) user.put_in_hands(ai_card) else diff --git a/code/modules/food_and_drinks/drinks/bottler/bottler.dm b/code/modules/food_and_drinks/drinks/bottler/bottler.dm index 89c55a65f98..7c930f26f16 100644 --- a/code/modules/food_and_drinks/drinks/bottler/bottler.dm +++ b/code/modules/food_and_drinks/drinks/bottler/bottler.dm @@ -287,8 +287,7 @@ flick("bottler_on", src) spawn(45) for(var/i = 1, i <= slots.len, i++) - qdel(slots[i]) - slots[i] = null + QDEL_NULL(slots[i]) bottling = 0 drink_container.forceMove(loc) updateUsrDialog() @@ -406,4 +405,4 @@ else if(bottling) icon_state = "bottler_on" else - icon_state = "bottler_off" \ No newline at end of file + icon_state = "bottler_off" diff --git a/code/modules/hydroponics/gene_modder.dm b/code/modules/hydroponics/gene_modder.dm index ebe74316ed4..bade37d1b3a 100644 --- a/code/modules/hydroponics/gene_modder.dm +++ b/code/modules/hydroponics/gene_modder.dm @@ -296,8 +296,7 @@ var/datum/plant_gene/core/gene = disk.gene gene.value = min(gene.value, max_extract_pot) disk.update_name() - qdel(seed) - seed = null + QDEL_NULL(seed) update_icon() if("replace") if(disk && disk.gene && istype(disk.gene, G.type) && istype(G, /datum/plant_gene/core)) @@ -421,4 +420,4 @@ /obj/item/weapon/storage/box/disks_plantgene/New() ..() for(var/i in 1 to 7) - new /obj/item/weapon/disk/plantgene(src) \ No newline at end of file + new /obj/item/weapon/disk/plantgene(src) diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm index 7c5297e07c4..d38a7468d9c 100644 --- a/code/modules/hydroponics/hydroponics.dm +++ b/code/modules/hydroponics/hydroponics.dm @@ -373,8 +373,7 @@ var/oldPlantName if(myseed) // In case there's nothing in the tray beforehand oldPlantName = myseed.plantname - qdel(myseed) - myseed = null + QDEL_NULL(myseed) else oldPlantName = "empty tray" switch(rand(1,18)) // randomly pick predominative weed @@ -422,8 +421,7 @@ var/oldPlantName = myseed.plantname if(myseed.mutatelist.len > 0) var/mutantseed = pick(myseed.mutatelist) - qdel(myseed) - myseed = null + QDEL_NULL(myseed) myseed = new mutantseed else return @@ -445,8 +443,7 @@ /obj/machinery/hydroponics/proc/mutateweed() // If the weeds gets the mutagent instead. Mind you, this pretty much destroys the old plant if( weedlevel > 5 ) if(myseed) - qdel(myseed) - myseed = null + QDEL_NULL(myseed) var/newWeed = pick(/obj/item/seeds/liberty, /obj/item/seeds/angel, /obj/item/seeds/nettle/death, /obj/item/seeds/kudzu) myseed = new newWeed dead = 0 @@ -914,8 +911,7 @@ plant_health = 0 if(harvest) harvest = FALSE //To make sure they can't just put in another seed and insta-harvest it - qdel(myseed) - myseed = null + QDEL_NULL(myseed) plant_hud_set_health() plant_hud_set_status() adjustWeeds(-10) //Has a side effect of cleaning up those nasty weeds @@ -935,8 +931,7 @@ else if(dead) dead = 0 to_chat(user, "You remove the dead plant from [src].") - qdel(myseed) - myseed = null + QDEL_NULL(myseed) update_icon() plant_hud_set_status() plant_hud_set_health() @@ -953,8 +948,7 @@ else to_chat(user, "You harvest [myseed.getYield()] items from the [myseed.plantname].") if(!myseed.get_gene(/datum/plant_gene/trait/repeated_harvest)) - qdel(myseed) - myseed = null + QDEL_NULL(myseed) dead = 0 plant_hud_set_status() plant_hud_set_health() @@ -1041,4 +1035,4 @@ else ..() -#undef HYDRO_CYCLES_PER_AGE \ No newline at end of file +#undef HYDRO_CYCLES_PER_AGE diff --git a/code/modules/library/computers/checkout.dm b/code/modules/library/computers/checkout.dm index 2decc555693..526daeb68a8 100644 --- a/code/modules/library/computers/checkout.dm +++ b/code/modules/library/computers/checkout.dm @@ -178,8 +178,7 @@ M = new manual_type() dat += "