Converts Most Destroys to use QDEL_NULL

This commit is contained in:
Fox-McCloud
2017-04-04 23:08:41 -04:00
parent ba8b1dae55
commit 5631d36ff8
121 changed files with 217 additions and 468 deletions
+2 -6
View File
@@ -53,15 +53,11 @@ Pipelines + Other Objects -> Pipe network
stored = new(src, make_from = src)
/obj/machinery/atmospherics/Destroy()
if(stored)
qdel(stored)
stored = null
QDEL_NULL(stored)
for(var/mob/living/L in src) //ventcrawling is serious business
L.remove_ventcrawl()
L.forceMove(get_turf(src))
if(pipe_image)
qdel(pipe_image) //we have to del it, or it might keep a ref somewhere else
pipe_image = null
QDEL_NULL(pipe_image) //we have to del it, or it might keep a ref somewhere else
return ..()
// Icons/overlays/underlays
+1 -2
View File
@@ -21,8 +21,7 @@
/obj/machinery/atmospherics/pipe/Destroy()
releaseAirToTurf()
qdel(air_temporary)
air_temporary = null
QDEL_NULL(air_temporary)
var/turf/T = loc
for(var/obj/machinery/meter/meter in T)
+1 -2
View File
@@ -70,8 +70,7 @@
/turf/simulated/Destroy()
visibilityChanged()
if(active_hotspot)
qdel(active_hotspot)
QDEL_NULL(active_hotspot)
return ..()
/turf/simulated/assume_air(datum/gas_mixture/giver)
+1 -2
View File
@@ -54,8 +54,7 @@
qdel(hide_actions_toggle)
hide_actions_toggle = null
qdel(module_store_icon)
module_store_icon = null
QDEL_NULL(module_store_icon)
if(static_inventory.len)
for(var/thing in static_inventory)
+1 -2
View File
@@ -29,8 +29,7 @@
Remove(owner)
if(target)
target = null
qdel(button)
button = null
QDEL_NULL(button)
return ..()
/datum/action/proc/Grant(mob/M)
+7 -8
View File
@@ -100,7 +100,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
var/action_icon = 'icons/mob/actions.dmi'
var/action_icon_state = "spell_default"
var/action_background_icon_state = "bg_spell"
var/sound = null //The sound the spell makes when it is cast
/obj/effect/proc_holder/spell/proc/cast_check(skipcharge = 0, mob/living/user = usr) //checks if the spell can be cast based on its settings; skipcharge is used when an additional cast_check is called inside the spell
@@ -184,8 +184,8 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
user.visible_message(invocation, invocation_emote_self) //same style as in mob/living/emote.dm
/obj/effect/proc_holder/spell/proc/playMagSound()
playsound(get_turf(usr), sound,50,1)
playsound(get_turf(usr), sound,50,1)
/obj/effect/proc_holder/spell/New()
..()
action = new(src)
@@ -194,8 +194,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
charge_counter = charge_max
/obj/effect/proc_holder/spell/Destroy()
qdel(action)
action = null
QDEL_NULL(action)
return ..()
/obj/effect/proc_holder/spell/Click()
@@ -223,10 +222,10 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
spawn(0)
if(charge_type == "recharge" && recharge)
start_recharge()
if(sound)
playMagSound()
playMagSound()
if(prob(critfailchance))
critfail(targets)
else
+2 -4
View File
@@ -76,12 +76,10 @@
qdel(AA)
alternate_appearances = null
if(reagents)
qdel(reagents)
reagents = null
QDEL_NULL(reagents)
invisibility = 101
return ..()
//Hook for running code when a dir change occurs
/atom/proc/setDir(newdir)
dir = newdir
+1 -2
View File
@@ -35,8 +35,7 @@ var/bomb_set
poi_list |= src
/obj/machinery/nuclearbomb/Destroy()
qdel(wires)
wires = null
QDEL_NULL(wires)
poi_list.Remove(src)
return ..()
+1 -3
View File
@@ -22,9 +22,7 @@
hide(T.intact)
/obj/machinery/bluespace_beacon/Destroy()
if(Beacon)
qdel(Beacon)
Beacon = null
QDEL_NULL(Beacon)
return ..()
// update the invisibility and icon
+2 -4
View File
@@ -40,9 +40,7 @@
src.colorlist += D
/obj/machinery/pdapainter/Destroy()
if(storedpda)
qdel(storedpda)
storedpda = null
QDEL_NULL(storedpda)
return ..()
/obj/machinery/pdapainter/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
@@ -85,7 +83,7 @@
set name = "Eject PDA"
set category = "Object"
set src in oview(1)
if(usr.incapacitated())
return
+1 -2
View File
@@ -212,8 +212,7 @@
if(radio_controller)
radio_controller.remove_object(src, frequency)
air_alarm_repository.update_cache(src)
qdel(wires)
wires = null
QDEL_NULL(wires)
return ..()
/obj/machinery/alarm/proc/first_run()
@@ -36,10 +36,8 @@
/obj/machinery/portable_atmospherics/Destroy()
disconnect()
qdel(air_contents)
air_contents = null
qdel(holding)
holding = null
QDEL_NULL(air_contents)
QDEL_NULL(holding)
return ..()
/obj/machinery/portable_atmospherics/update_icon()
+2 -4
View File
@@ -67,10 +67,8 @@
RefreshParts()
/obj/machinery/autolathe/Destroy()
qdel(wires)
wires = null
qdel(materials)
materials = null
QDEL_NULL(wires)
QDEL_NULL(materials)
return ..()
/obj/machinery/autolathe/interact(mob/user)
+2 -6
View File
@@ -82,12 +82,8 @@
/obj/machinery/clonepod/Destroy()
if(connected)
connected.pods -= src
if(Radio)
qdel(Radio)
Radio = null
if(countdown)
qdel(countdown)
countdown = null
QDEL_NULL(Radio)
QDEL_NULL(countdown)
return ..()
/obj/machinery/clonepod/RefreshParts()
+3 -6
View File
@@ -10,12 +10,9 @@
var/obj/item/device/mmi/brain = null
/obj/structure/AIcore/Destroy()
qdel(laws)
qdel(circuit)
qdel(brain)
laws = null
circuit = null
brain = null
QDEL_NULL(laws)
QDEL_NULL(circuit)
QDEL_NULL(brain)
return ..()
/obj/structure/AIcore/attackby(obj/item/P as obj, mob/user as mob, params)
@@ -28,8 +28,7 @@
/obj/machinery/computer/camera_advanced/Destroy()
if(current_user)
current_user.unset_machine()
if(eyeobj)
qdel(eyeobj)
QDEL_NULL(eyeobj)
return ..()
/obj/machinery/computer/camera_advanced/on_unset_machine(mob/M)
+1 -2
View File
@@ -15,8 +15,7 @@
..()
/obj/machinery/computer/crew/Destroy()
qdel(crew_monitor)
crew_monitor = null
QDEL_NULL(crew_monitor)
return ..()
/obj/machinery/computer/crew/attack_ai(mob/user)
+2 -3
View File
@@ -16,7 +16,7 @@
power_monitors += src
power_monitors = sortAtom(power_monitors)
power_monitor = new(src)
/obj/machinery/computer/monitor/initialize()
..()
powermonitor_repository.update_cache()
@@ -25,8 +25,7 @@
/obj/machinery/computer/monitor/Destroy()
power_monitors -= src
powermonitor_repository.update_cache()
qdel(power_monitor)
power_monitor = null
QDEL_NULL(power_monitor)
return ..()
/obj/machinery/computer/monitor/power_change()
@@ -24,8 +24,7 @@
/obj/machinery/computer/station_alert/Destroy()
alarm_monitor.unregister(src)
qdel(alarm_monitor)
alarm_monitor = null
QDEL_NULL(alarm_monitor)
return ..()
/obj/machinery/computer/station_alert/attack_ai(mob/user)
+1 -2
View File
@@ -348,8 +348,7 @@ About the new airlock wires panel:
/obj/machinery/door/airlock/Destroy()
qdel(wires)
wires = null
QDEL_NULL(wires)
if(main_power_timer)
deltimer(main_power_timer)
main_power_timer = null
+1 -3
View File
@@ -25,9 +25,7 @@
density = 0
if(health == 0)
playsound(src, "shatter", 70, 1)
if(electronics)
qdel(electronics)
electronics = null
QDEL_NULL(electronics)
return ..()
+1 -3
View File
@@ -20,9 +20,7 @@
..()
/obj/machinery/floodlight/Destroy()
if(cell)
qdel(cell)
cell = null
QDEL_NULL(cell)
return ..()
/obj/machinery/floodlight/proc/updateicon()
+1 -3
View File
@@ -15,9 +15,7 @@
/obj/machinery/iv_drip/Destroy()
attached = null
if(beaker)
qdel(beaker)
beaker = null
QDEL_NULL(beaker)
return ..()
/obj/machinery/iv_drip/update_icon()
+1 -3
View File
@@ -113,9 +113,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
/obj/machinery/newscaster/Destroy()
allCasters -= src
viewing_channel = null
if(photo)
qdel(photo)
photo = null
QDEL_NULL(photo)
return ..()
/obj/machinery/newscaster/update_icon()
+16 -17
View File
@@ -20,7 +20,7 @@
var/health = 80 //the turret's health
var/locked = 1 //if the turret's behaviour control access is locked
var/controllock = 0 //if the turret responds to control panels
var/installation = /obj/item/weapon/gun/energy/gun/turret //the type of weapon installed
var/gun_charge = 0 //the charge of the gun inserted
var/projectile = null //holder for bullettype
@@ -56,7 +56,7 @@
var/screen = 0 // Screen 0: main control, screen 1: access levels
var/one_access = 0 // Determines if access control is set to req_one_access or req_access
var/syndicate = 0 //is the turret a syndicate turret?
var/faction = ""
var/emp_vulnerable = 1 // Can be empd
@@ -94,8 +94,7 @@
setup()
/obj/machinery/porta_turret/Destroy()
qdel(spark_system)
spark_system = null
QDEL_NULL(spark_system)
return ..()
/obj/machinery/porta_turret/centcom/New()
@@ -549,8 +548,8 @@ var/list/turret_icons
/obj/machinery/porta_turret/proc/in_faction(mob/living/target)
if(!(faction in target.faction))
return 0
return 1
return 1
/obj/machinery/porta_turret/proc/assess_and_assign(var/mob/living/L, var/list/targets, var/list/secondarytargets)
switch(assess_living(L))
if(TURRET_PRIORITY_TARGET)
@@ -582,7 +581,7 @@ var/list/turret_icons
if(emagged) // If emagged not even the dead get a rest
return L.stat ? TURRET_SECONDARY_TARGET : TURRET_PRIORITY_TARGET
if(in_faction(L))
return TURRET_NOT_TARGET
@@ -967,46 +966,46 @@ var/list/turret_icons
/atom/movable/porta_turret_cover
icon = 'icons/obj/turrets.dmi'
// Syndicate turrets
/obj/machinery/porta_turret/syndicate
projectile = /obj/item/projectile/bullet
eprojectile = /obj/item/projectile/bullet
shot_sound = 'sound/weapons/Gunshot.ogg'
eshot_sound = 'sound/weapons/Gunshot.ogg'
icon_state = "syndieturret0"
var/icon_state_initial = "syndieturret0"
var/icon_state_active = "syndieturret1"
var/icon_state_destroyed = "syndieturret2"
syndicate = 1
installation = null
always_up = 1
use_power = 0
has_cover = 0
raised = 1
scan_range = 9
scan_range = 9
faction = "syndicate"
emp_vulnerable = 0
lethal = 1
check_arrest = 0
check_records = 0
check_weapons = 0
check_access = 0
check_anomalies = 1
check_anomalies = 1
check_synth = 1
ailock = 1
/obj/machinery/porta_turret/syndicate/New()
..()
if(req_one_access && req_one_access.len)
req_one_access.Cut()
req_access = list(access_syndicate)
one_access = 0
/obj/machinery/porta_turret/syndicate/update_icon()
if(stat & BROKEN)
icon_state = icon_state_destroyed
@@ -1025,7 +1024,7 @@ var/list/turret_icons
health = 40
projectile = /obj/item/projectile/bullet/weakbullet3
eprojectile = /obj/item/projectile/bullet/weakbullet3
/obj/machinery/porta_turret/syndicate/interior
name = "machine gun turret (.45)"
desc = "Syndicate interior defense turret chambered for .45 rounds. Designed to down intruders without damaging the hull."
+1 -2
View File
@@ -29,8 +29,7 @@ var/const/SAFETY_COOLDOWN = 100
update_icon()
/obj/machinery/recycler/Destroy()
qdel(materials)
materials = null
QDEL_NULL(materials)
return ..()
/obj/machinery/recycler/RefreshParts()
+1 -3
View File
@@ -20,9 +20,7 @@
return
/obj/machinery/space_heater/Destroy()
if(cell)
qdel(cell)
cell = null
QDEL_NULL(cell)
return ..()
/obj/machinery/space_heater/update_icon()
+3 -4
View File
@@ -41,8 +41,7 @@
..()
/obj/machinery/syndicatebomb/Destroy()
qdel(wires)
wires = null
QDEL_NULL(wires)
return ..()
/obj/machinery/syndicatebomb/examine(mob/user)
@@ -102,7 +101,7 @@
to_chat(user, "<span class='notice'>[payload] is already loaded into [src], you'll have to remove it first.</span>")
else
..()
/obj/machinery/syndicatebomb/attack_ghost(mob/user)
interact(user)
@@ -122,7 +121,7 @@
return
else if(anchored)
to_chat(user, "<span class='notice'>The bomb is bolted to the floor!</span>")
/obj/machinery/syndicatebomb/proc/can_interact(mob/user)
if(user.can_advanced_admin_interact())
return TRUE
+2 -5
View File
@@ -146,11 +146,8 @@
product_records.Add(product)
/obj/machinery/vending/Destroy()
qdel(wires) // qdel
wires = null
if(coin)
qdel(coin) // qdel
coin = null
QDEL_NULL(wires)
QDEL_NULL(coin)
return ..()
/obj/machinery/vending/ex_act(severity)
+1 -2
View File
@@ -629,8 +629,7 @@
else
qdel(cabin_air)
cabin_air = null
qdel(spark_system)
spark_system = null
QDEL_NULL(spark_system)
mechas_list -= src //global mech list
return ..()
+1 -3
View File
@@ -36,9 +36,7 @@
to_chat(user, "This is a [generation]\th generation [name]!")
/obj/structure/glowshroom/Destroy()
if(myseed)
qdel(myseed)
myseed = null
QDEL_NULL(myseed)
return ..()
/obj/structure/glowshroom/New(loc, obj/item/seeds/newseed, mutate_stats)
+1 -3
View File
@@ -19,9 +19,7 @@
ID.access = get_region_accesses(region_access)
/obj/item/weapon/door_remote/Destroy()
if(ID)
qdel(ID)
ID = null
QDEL_NULL(ID)
return ..()
/obj/item/weapon/door_remote/attack_self(mob/user)
+1 -2
View File
@@ -17,8 +17,7 @@
song.instrumentExt = "ogg"
/obj/item/device/guitar/Destroy()
qdel(song)
song = null
QDEL_NULL(song)
return ..()
/obj/item/device/guitar/attack_self(mob/user as mob)
@@ -35,9 +35,7 @@
pointer_icon_state = pick("red_laser","green_laser","blue_laser","purple_laser")
/obj/item/device/laser_pointer/Destroy()
if(diode)
qdel(diode)
diode = null
QDEL_NULL(diode)
return ..()
/obj/item/device/laser_pointer/upgraded/New()
+2 -4
View File
@@ -12,7 +12,7 @@
var/looking_for_personality = 0
var/mob/living/silicon/pai/pai
var/list/faction = list("neutral") // The factions the pAI will inherit from the card
/obj/item/device/paicard/syndicate
name = "syndicate personal AI device"
faction = list("syndicate")
@@ -33,9 +33,7 @@
pai.ghostize()
qdel(pai)
pai = null
if(radio)
qdel(radio)
radio = null
QDEL_NULL(radio)
return ..()
/obj/item/device/paicard/attack_self(mob/user)
@@ -12,8 +12,7 @@
crew_monitor = new(src)
/obj/item/device/sensor_device/Destroy()
qdel(crew_monitor)
crew_monitor = null
QDEL_NULL(crew_monitor)
return ..()
/obj/item/device/sensor_device/attack_self(mob/user as mob)
@@ -21,9 +21,7 @@
update_icon()
/obj/item/device/taperecorder/Destroy()
if(mytape)
qdel(mytape)
mytape = null
QDEL_NULL(mytape)
return ..()
/obj/item/device/taperecorder/examine(mob/user)
@@ -13,15 +13,9 @@
origin_tech = "materials=1;engineering=1"
/obj/item/device/transfer_valve/Destroy()
if(tank_one)
qdel(tank_one)
tank_one = null
if(tank_two)
qdel(tank_two)
tank_two = null
if(attached_device)
qdel(attached_device)
attached_device = null
QDEL_NULL(tank_one)
QDEL_NULL(tank_two)
QDEL_NULL(attached_device)
attacher = null
return ..()
+1 -2
View File
@@ -18,8 +18,7 @@
song.instrumentExt = "ogg"
/obj/item/device/violin/Destroy()
qdel(song)
song = null
QDEL_NULL(song)
return ..()
/obj/item/device/violin/initialize()
+1 -3
View File
@@ -12,9 +12,7 @@
var/datum/gas_mixture/air_contents = null
/obj/item/latexballon/Destroy()
if(air_contents)
qdel(air_contents)
air_contents = null
QDEL_NULL(air_contents)
return ..()
/obj/item/latexballon/proc/blow(obj/item/weapon/tank/tank, mob/user)
+1 -2
View File
@@ -59,8 +59,7 @@ RCD
return
/obj/item/weapon/rcd/Destroy()
qdel(spark_system)
spark_system = null
QDEL_NULL(spark_system)
rcd_list -= src
return ..()
+1 -3
View File
@@ -62,9 +62,7 @@
to_chat(user, "<span class='info'>It contains [loaded.amount]/[max_amount] cables.</span>")
/obj/item/weapon/twohanded/rcl/Destroy()
if(loaded)
qdel(loaded)
loaded = null
QDEL_NULL(loaded)
last = null
active = 0
return ..()
+1 -3
View File
@@ -46,9 +46,7 @@ LIGHTERS ARE IN LIGHTERS.DM
reagents.set_reacting(FALSE) // so it doesn't react until you light it
/obj/item/clothing/mask/cigarette/Destroy()
if(reagents)
qdel(reagents)
reagents = null
QDEL_NULL(reagents)
processing_objects -= src
return ..()
+2 -6
View File
@@ -172,12 +172,8 @@
if(on)
var/M = get(paddles, /mob)
remove_paddles(M)
if(paddles)
qdel(paddles)
paddles = null
if(bcell)
qdel(bcell)
bcell = null
QDEL_NULL(paddles)
QDEL_NULL(bcell)
return ..()
/obj/item/weapon/defibrillator/proc/deductcharge(var/chrgdeductamt)
@@ -18,9 +18,7 @@
..()
/obj/item/weapon/grenade/plastic/Destroy()
if(nadeassembly)
qdel(nadeassembly)
nadeassembly = null
QDEL_NULL(nadeassembly)
target = null
return ..()
@@ -25,15 +25,9 @@
/obj/item/weapon/flamethrower/Destroy()
if(weldtool)
qdel(weldtool)
weldtool = null
if(igniter)
qdel(igniter)
igniter = null
if(ptank)
qdel(ptank)
ptank = null
QDEL_NULL(weldtool)
QDEL_NULL(igniter)
QDEL_NULL(ptank)
previousturf = null
return ..()
@@ -27,9 +27,7 @@
update_icon()
/obj/item/weapon/grenade/chem_grenade/Destroy()
if(nadeassembly)
qdel(nadeassembly)
nadeassembly = null
QDEL_NULL(nadeassembly)
for(var/thing in beakers)
qdel(thing)
beakers.Cut()
+2 -6
View File
@@ -27,12 +27,8 @@
icon_state = "[initial(icon_state)][armed]"
/obj/item/weapon/restraints/legcuffs/beartrap/Destroy()
if(IED)
qdel(IED)
IED = null
if(sig)
qdel(sig)
sig = null
QDEL_NULL(IED)
QDEL_NULL(sig)
return ..()
/obj/item/weapon/restraints/legcuffs/beartrap/suicide_act(mob/user)
@@ -17,9 +17,7 @@
var/pressureSetting = 1 //How powerful the cannon is - higher pressure = more gas but more powerful throws
/obj/item/weapon/pneumatic_cannon/Destroy()
if(tank)
qdel(tank)
tank = null
QDEL_NULL(tank)
for(var/obj/item/I in loadedItems)
qdel(I)
loadedItems.Cut()
+1 -3
View File
@@ -17,9 +17,7 @@
/obj/item/weapon/melee/powerfist/Destroy()
if(tank)
qdel(tank)
tank = null
QDEL_NULL(tank)
return ..()
/obj/item/weapon/melee/powerfist/examine(mob/user)
@@ -186,7 +186,7 @@
/obj/item/weapon/storage/fancy/cigarettes/Destroy()
qdel(reagents)
QDEL_NULL(reagents)
return ..()
@@ -454,8 +454,8 @@
for(var/obj/O in contents)
O.mouse_opacity = initial(O.mouse_opacity)
qdel(boxes)
qdel(closer)
QDEL_NULL(boxes)
QDEL_NULL(closer)
return ..()
/obj/item/weapon/storage/emp_act(severity)
+2 -6
View File
@@ -24,9 +24,7 @@
return
/obj/item/weapon/melee/baton/Destroy()
if(bcell)
qdel(bcell)
bcell = null
QDEL_NULL(bcell)
return ..()
/obj/item/weapon/melee/baton/loaded/New() //this one starts with a cell pre-installed.
@@ -208,9 +206,7 @@
sparkler = new(src)
/obj/item/weapon/melee/baton/cattleprod/Destroy()
if(sparkler)
qdel(sparkler)
sparkler = null
QDEL_NULL(sparkler)
return ..()
/obj/item/weapon/melee/baton/cattleprod/baton_stun()
@@ -19,8 +19,7 @@
ion_trail.set_up(src)
/obj/item/weapon/tank/jetpack/Destroy()
qdel(ion_trail)
ion_trail = null
QDEL_NULL(ion_trail)
return ..()
/obj/item/weapon/tank/jetpack/ui_action_click(mob/user, actiontype)
@@ -82,7 +81,7 @@
var/datum/gas_mixture/removed = air_contents.remove(num)
if(removed.total_moles() < 0.005)
turn_off()
turn_off()
return 0
var/turf/T = get_turf(user)
@@ -33,9 +33,7 @@
return
/obj/item/weapon/tank/Destroy()
if(air_contents)
qdel(air_contents)
air_contents = null
QDEL_NULL(air_contents)
processing_objects.Remove(src)
+1 -3
View File
@@ -20,9 +20,7 @@
var/obj/item/weapon/canvas/painting = null
/obj/structure/easel/Destroy()
if(painting)
qdel(painting)
painting = null
QDEL_NULL(painting)
return ..()
//Adding canvases
+3 -8
View File
@@ -23,12 +23,8 @@ var/global/list/captain_display_cases = list()
var/state = DISPLAYCASE_FRAME_CIRCUIT
/obj/structure/displaycase_frame/Destroy()
if(circuit)
qdel(circuit)
circuit = null
if(sensor)
qdel(sensor)
sensor = null
QDEL_NULL(circuit)
QDEL_NULL(sensor)
return ..()
/obj/structure/displaycase_frame/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
@@ -125,8 +121,7 @@ var/global/list/captain_display_cases = list()
/obj/structure/displaycase/Destroy()
dump()
qdel(circuit)
circuit = null
QDEL_NULL(circuit)
return ..()
/obj/structure/displaycase/captains_laser/Destroy()
@@ -18,9 +18,7 @@
update_state()
/obj/structure/door_assembly/Destroy()
if(electronics)
qdel(electronics)
electronics = null
QDEL_NULL(electronics)
return ..()
/obj/structure/door_assembly/door_assembly_com
+8 -24
View File
@@ -15,30 +15,14 @@
var/obj/item/taperoll/engineering/myengitape = null
/obj/structure/engineeringcart/Destroy()
if(myglass)
qdel(myglass)
myglass = null
if(mymetal)
qdel(mymetal)
mymetal = null
if(myplasteel)
qdel(myplasteel)
myplasteel = null
if(myflashlight)
qdel(myflashlight)
myflashlight = null
if(mybluetoolbox)
qdel(mybluetoolbox)
mybluetoolbox = null
if(myyellowtoolbox)
qdel(myyellowtoolbox)
myyellowtoolbox = null
if(myredtoolbox)
qdel(myredtoolbox)
myredtoolbox = null
if(myengitape)
qdel(myengitape)
myengitape = null
QDEL_NULL(myglass)
QDEL_NULL(mymetal)
QDEL_NULL(myplasteel)
QDEL_NULL(myflashlight)
QDEL_NULL(mybluetoolbox)
QDEL_NULL(myyellowtoolbox)
QDEL_NULL(myredtoolbox)
QDEL_NULL(myengitape)
return ..()
/obj/structure/engineeringcart/proc/put_in_cart(obj/item/I, mob/user)
+1 -3
View File
@@ -9,9 +9,7 @@
var/opened = 0
/obj/structure/extinguisher_cabinet/Destroy()
if(has_extinguisher)
qdel(has_extinguisher)
has_extinguisher = null
QDEL_NULL(has_extinguisher)
return ..()
/obj/structure/extinguisher_cabinet/attackby(obj/item/O, mob/user, params)
+4 -12
View File
@@ -25,18 +25,10 @@
/obj/structure/janitorialcart/Destroy()
janitorial_equipment -= src
if(mybag)
qdel(mybag)
mybag = null
if(mymop)
qdel(mymop)
mymop = null
if(myspray)
qdel(myspray)
myspray = null
if(myreplacer)
qdel(myreplacer)
myreplacer = null
QDEL_NULL(mybag)
QDEL_NULL(mymop)
QDEL_NULL(myspray)
QDEL_NULL(myreplacer)
return ..()
/obj/structure/janitorialcart/proc/wet_mop(obj/item/weapon/mop, mob/user)
+4 -8
View File
@@ -160,9 +160,7 @@
return
/obj/structure/morgue/Destroy()
if(connected)
qdel(connected)
connected = null
QDEL_NULL(connected)
return ..()
/obj/structure/morgue/container_resist(var/mob/living/L)
@@ -405,9 +403,7 @@
return
/obj/structure/crematorium/Destroy()
if(connected)
qdel(connected)
connected = null
QDEL_NULL(connected)
return ..()
/obj/structure/crematorium/container_resist(var/mob/living/L)
@@ -471,7 +467,7 @@
connected.connected = null
connected = null
return ..()
// Crematorium switch
/obj/machinery/crema_switch
desc = "Burn baby burn!"
@@ -484,7 +480,7 @@
var/area/area = null
var/otherarea = null
var/id = 1
/obj/machinery/crema_switch/attack_ghost(mob/user)
if(user.can_advanced_admin_interact())
return attack_hand(user)
+1 -2
View File
@@ -281,8 +281,7 @@
icon_state = "piano"
/obj/structure/piano/Destroy()
qdel(song)
song = null
QDEL_NULL(song)
return ..()
/obj/structure/piano/initialize()
+1 -3
View File
@@ -9,9 +9,7 @@
var/obj/item/target/pinned_target // the current pinned target
/obj/structure/target_stake/Destroy()
if(pinned_target)
qdel(pinned_target)
pinned_target = null
QDEL_NULL(pinned_target)
return ..()
/obj/structure/target_stake/Move()
@@ -34,9 +34,7 @@ obj/structure/windoor_assembly/New(dir=NORTH)
obj/structure/windoor_assembly/Destroy()
density = 0
if(electronics)
qdel(electronics)
electronics = null
QDEL_NULL(electronics)
air_update_turf(1)
return ..()
+1 -3
View File
@@ -41,9 +41,7 @@ var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3","
builtin_tile = new floor_tile
/turf/simulated/floor/Destroy()
if(builtin_tile)
qdel(builtin_tile)
builtin_tile = null
QDEL_NULL(builtin_tile)
return ..()
+1 -2
View File
@@ -59,8 +59,7 @@
water_overlay = new(src)
/turf/unsimulated/beach/water/drop/Destroy()
qdel(water_overlay)
water_overlay = null
QDEL_NULL(water_overlay)
return ..()
/obj/effect/effect/beach_drop_overlay
@@ -51,8 +51,7 @@
mob_hunt_server.red_terminal = null
if(mob_hunt_server.blue_terminal == src)
mob_hunt_server.blue_terminal = null
if(avatar)
qdel(avatar)
QDEL_NULL(avatar)
return ..()
/obj/machinery/computer/mob_battle_terminal/attackby(obj/item/O, mob/user)
+1 -2
View File
@@ -12,8 +12,7 @@
sparks.attach(src)
/obj/item/device/assembly/igniter/Destroy()
qdel(sparks)
sparks = null
QDEL_NULL(sparks)
return ..()
+1 -3
View File
@@ -255,9 +255,7 @@
/obj/effect/beam/i_beam/Destroy()
if(master.first == src)
master.first = null
if(next)
qdel(next)
next = null
QDEL_NULL(next)
if(previous)
previous.next = null
master.last = previous
+2 -4
View File
@@ -10,10 +10,8 @@
flags = CONDUCT
/obj/item/assembly/shock_kit/Destroy()
qdel(part1)
part1 = null
qdel(part2)
part2 = null
QDEL_NULL(part1)
QDEL_NULL(part2)
return ..()
/obj/item/assembly/shock_kit/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
@@ -18,6 +18,7 @@
if(water_timer)
deltimer(water_timer)
water_timer = null
return ..()
/obj/effect/waterfall/proc/drip()
var/obj/effect/effect/water/W = new(loc)
@@ -116,8 +116,7 @@
if(roomtimer)
deltimer(roomtimer)
roomtimer = null
qdel(card)
card = null
QDEL_NULL(card)
return ..()
/obj/machinery/door/unpowered/hotel_door/examine(mob/user)
@@ -220,9 +219,7 @@
vacant_rooms.Cut()
guests.Cut()
if(radio)
qdel(radio)
radio = null
QDEL_NULL(radio)
return ..()
+1 -2
View File
@@ -111,8 +111,7 @@
init(R)
/turf/unsimulated/floor/upperlevel/Destroy()
qdel(sensor)
sensor = null
QDEL_NULL(sensor)
return ..()
/turf/unsimulated/floor/upperlevel/proc/init(var/obj/effect/levelref/R)
@@ -70,9 +70,7 @@
update_icon()
/obj/item/clothing/gloves/color/yellow/stun/Destroy()
if(cell)
qdel(cell)
cell = null
QDEL_NULL(cell)
return ..()
/obj/item/clothing/gloves/color/yellow/stun/Touch(atom/A, proximity)
+2 -4
View File
@@ -165,10 +165,8 @@
M.unEquip(piece)
qdel(piece)
processing_objects -= src
qdel(wires)
wires = null
qdel(spark_system)
spark_system = null
QDEL_NULL(wires)
QDEL_NULL(spark_system)
return ..()
/obj/item/weapon/rig/proc/suit_is_deployed()
+1 -3
View File
@@ -10,9 +10,7 @@
..()
/obj/item/clothing/suit/hooded/Destroy()
if(hood)
qdel(hood)
hood = null
QDEL_NULL(hood)
return ..()
/obj/item/clothing/suit/hooded/proc/MakeHood()
+1 -2
View File
@@ -9,8 +9,7 @@
pockets.max_combined_w_class = 4
/obj/item/clothing/suit/storage/Destroy()
qdel(pockets)
pockets = null
QDEL_NULL(pockets)
return ..()
/obj/item/clothing/suit/storage/attack_hand(mob/user as mob)
@@ -386,9 +386,7 @@
var/obj/item/weapon/card/id/access_id
/obj/item/clothing/accessory/petcollar/Destroy()
if(access_id)
qdel(access_id)
access_id = null
QDEL_NULL(access_id)
processing_objects -= src
return ..()
@@ -50,8 +50,7 @@
wires = new/datum/wires/smartfridge(src)
/obj/machinery/smartfridge/Destroy()
qdel(wires)
wires = null
QDEL_NULL(wires)
for(var/atom/movable/A in contents)
A.forceMove(loc)
return ..()
+2 -6
View File
@@ -31,12 +31,8 @@
RefreshParts()
/obj/machinery/biogenerator/Destroy()
if(beaker)
qdel(beaker)
beaker = null
if(files)
qdel(files)
files = null
QDEL_NULL(beaker)
QDEL_NULL(files)
return ..()
/obj/machinery/biogenerator/ex_act(severity)
+3 -9
View File
@@ -36,12 +36,8 @@
reagent_genes.Cut()
trait_genes.Cut()
target = null
if(seed)
qdel(seed)
seed = null
if(disk)
qdel(disk)
disk = null
QDEL_NULL(seed)
QDEL_NULL(disk)
return ..()
/obj/machinery/plantgenes/RefreshParts()
@@ -384,9 +380,7 @@
pixel_y = rand(-5, 5)
/obj/item/weapon/disk/plantgene/Destroy()
if(gene)
qdel(gene)
gene = null
QDEL_NULL(gene)
return ..()
/obj/item/weapon/disk/plantgene/attackby(obj/item/weapon/W, mob/user, params)
+1 -3
View File
@@ -40,9 +40,7 @@
add_juice()
/obj/item/weapon/reagent_containers/food/snacks/grown/Destroy()
if(seed)
qdel(seed)
seed = null
QDEL_NULL(seed)
return ..()
/obj/item/weapon/reagent_containers/food/snacks/grown/proc/add_juice()
+1 -3
View File
@@ -32,9 +32,7 @@
add_juice()
/obj/item/weapon/grown/Destroy()
if(seed)
qdel(seed)
seed = null
QDEL_NULL(seed)
return ..()
/obj/item/weapon/grown/attackby(obj/item/O, mob/user, params)
+1 -3
View File
@@ -75,9 +75,7 @@
plant_hud_set_water()
/obj/machinery/hydroponics/Destroy()
if(myseed)
qdel(myseed)
myseed = null
QDEL_NULL(myseed)
return ..()
/obj/machinery/hydroponics/constructable/attackby(obj/item/I, mob/user, params)
@@ -33,7 +33,7 @@
if(bag)
bag.loc = user
bag.attackby(W, user, params)
/obj/item/device/shared_storage/attack_self(mob/living/carbon/user)
if(!iscarbon(user))
return
@@ -116,7 +116,7 @@
H.adjustBruteLoss(20)
H.emote("scream")
..()*/
//Boat
/obj/vehicle/lavaboat
@@ -183,7 +183,7 @@
generic_pixel_y = 2
generic_pixel_x = 1
vehicle_move_delay = 1
// Wisp Lantern
/obj/item/device/wisp_lantern
name = "spooky lantern"
@@ -238,16 +238,16 @@
layer = ABOVE_ALL_MOB_LAYER
light_power = 1
light_range = 7
//Red/Blue Cubes
/obj/item/device/warp_cube
name = "blue cube"
desc = "A mysterious blue cube."
icon = 'icons/obj/lavaland/artefacts.dmi'
icon_state = "blue_cube"
var/obj/item/device/warp_cube/linked
/obj/item/device/warp_cube/Destroy()
if(linked)
linked.linked = null
@@ -260,14 +260,14 @@
return
var/datum/effect/system/harmless_smoke_spread/smoke = new /datum/effect/system/harmless_smoke_spread()
smoke.set_up(1, 0, user.loc)
smoke.set_up(1, 0, user.loc)
smoke.start()
user.forceMove(get_turf(linked))
feedback_add_details("warp_cube","[src.type]")
var/datum/effect/system/harmless_smoke_spread/smoke2 = new /datum/effect/system/harmless_smoke_spread()
smoke2.set_up(1, 0, user.loc)
smoke2.set_up(1, 0, user.loc)
smoke2.start()
/obj/item/device/warp_cube/red
@@ -281,7 +281,7 @@
var/obj/item/device/warp_cube/blue = new(src.loc)
linked = blue
blue.linked = src
//Meat Hook
/obj/item/weapon/gun/magic/hook
@@ -329,9 +329,9 @@
L.forceMove(get_turf(firer))
/obj/item/projectile/hook/Destroy()
qdel(chain)
QDEL_NULL(chain)
return ..()
//Immortality Talisman
/obj/item/device/immortality_talisman
+1
View File
@@ -226,6 +226,7 @@
/obj/item/device/mobcapsule/Destroy()
if(captured)
captured.ghostize()
qdel(captured)
captured = null
return ..()
+3 -4
View File
@@ -62,7 +62,7 @@
points = 1
refined_type = /obj/item/stack/sheet/glass
materials = list(MAT_GLASS=MINERAL_MATERIAL_AMOUNT)
/obj/item/weapon/ore/glass/basalt
name = "volcanic ash"
icon_state = "volcanic_sand"
@@ -163,8 +163,7 @@
var/datum/wires/explosive/gibtonite/wires
/obj/item/weapon/twohanded/required/gibtonite/Destroy()
qdel(wires)
wires = null
QDEL_NULL(wires)
return ..()
/obj/item/weapon/twohanded/required/gibtonite/attackby(obj/item/I, mob/user, params)
@@ -192,7 +191,7 @@
quality = 1
return
..()
/obj/item/weapon/twohanded/required/gibtonite/attack_ghost(mob/user)
if(wires)
wires.Interact(user)
+2 -6
View File
@@ -167,12 +167,8 @@
if(isrobot(loc))
var/mob/living/silicon/robot/borg = loc
borg.mmi = null
if(brainmob)
qdel(brainmob)
brainmob = null
if(held_brain)
qdel(held_brain)
held_brain = null
QDEL_NULL(brainmob)
QDEL_NULL(held_brain)
return ..()
/obj/item/device/mmi/syndie
@@ -123,7 +123,5 @@
icon_state = "scroll"
/obj/item/organ/internal/brain/Destroy() //copypasted from MMIs.
if(brainmob)
qdel(brainmob)
brainmob = null
QDEL_NULL(brainmob)
return ..()
+1 -1
View File
@@ -246,7 +246,7 @@ var/list/ai_verbs_default = list(
ai_list -= src
shuttle_caller_list -= src
shuttle_master.autoEvac()
qdel(eyeobj) // No AI, no Eye
QDEL_NULL(eyeobj) // No AI, no Eye
malfhack = null
return ..()
@@ -251,12 +251,10 @@ var/list/robot_verbs_default = list(
mmi = null
if(connected_ai)
connected_ai.connected_robots -= src
qdel(wires)
wires = null
qdel(module)
module = null
camera = null
cell = null
QDEL_NULL(wires)
QDEL_NULL(module)
QDEL_NULL(camera)
QDEL_NULL(cell)
return ..()
/mob/living/silicon/robot/proc/pick_module()
@@ -35,8 +35,7 @@
for(var/module in modules)
qdel(module)
modules.Cut()
qdel(emag)
emag = null
QDEL_NULL(emag)
return ..()
/obj/item/weapon/robot_module/proc/fix_modules()
@@ -169,14 +169,11 @@
/mob/living/simple_animal/bot/Destroy()
if(paicard)
ejectpai()
qdel(Radio)
Radio = null
qdel(access_card)
access_card = null
QDEL_NULL(Radio)
QDEL_NULL(access_card)
if(radio_controller && bot_filter)
radio_controller.remove_object(bot_core, control_freq)
qdel(bot_core)
bot_core = null
QDEL_NULL(bot_core)
return ..()
/mob/living/simple_animal/bot/death(gibbed)
@@ -263,7 +260,7 @@
interact(H)
else
return ..()
/mob/living/simple_animal/bot/attack_ghost(mob/M)
interact(M)
@@ -65,12 +65,8 @@
/mob/living/simple_animal/bot/mulebot/Destroy()
unload(0)
if(wires)
qdel(wires)
wires = null
if(cell)
qdel(cell)
cell = null
QDEL_NULL(wires)
QDEL_NULL(cell)
return ..()
/mob/living/simple_animal/bot/mulebot/proc/set_suffix(suffix)
@@ -295,8 +295,7 @@
queen = new(src)
/obj/item/queen_bee/Destroy()
qdel(queen)
queen = null
QDEL_NULL(queen)
return ..()
@@ -108,7 +108,7 @@ Difficulty: Hard
..()
/mob/living/simple_animal/hostile/megafauna/hierophant/Destroy()
qdel(spawned_rune)
QDEL_NULL(spawned_rune)
. = ..()
/mob/living/simple_animal/hostile/megafauna/hierophant/devour(mob/living/L)
@@ -43,7 +43,7 @@
mouse_opacity = 2 // Easier to click on in melee, they're giant targets anyway
/mob/living/simple_animal/hostile/megafauna/Destroy()
qdel(internal_gps)
QDEL_NULL(internal_gps)
. = ..()
/mob/living/simple_animal/hostile/megafauna/death(gibbed)
@@ -77,7 +77,7 @@
OpenFire()
else
devour(L)
/mob/living/simple_animal/hostile/megafauna/onShuttleMove()
var/turf/oldloc = loc
. = ..()
+1 -2
View File
@@ -444,8 +444,7 @@
if(assailant.client)
assailant.client.screen -= hud
assailant = null
qdel(hud)
hud = null
QDEL_NULL(hud)
return ..()
@@ -41,9 +41,7 @@ var/list/global_modular_computers = list()
global_modular_computers.Add(src)
/obj/machinery/modular_computer/Destroy()
if(cpu)
qdel(cpu)
cpu = null
QDEL_NULL(cpu)
return ..()
/obj/machinery/modular_computer/attack_ghost(mob/dead/observer/user)

Some files were not shown because too many files have changed in this diff Show More