Atmospherics Destroy() cleanup - return qdel hints.

This commit is contained in:
Leshana
2017-06-05 21:50:38 -04:00
parent aab81abb12
commit 78e0930576
11 changed files with 18 additions and 43 deletions

View File

@@ -42,7 +42,7 @@ obj/machinery/atmospherics/binary
return null return null
Destroy() Destroy()
loc = null . = ..()
if(node1) if(node1)
node1.disconnect(src) node1.disconnect(src)
@@ -54,8 +54,6 @@ obj/machinery/atmospherics/binary
node1 = null node1 = null
node2 = null node2 = null
..()
initialize() initialize()
if(node1 && node2) return if(node1 && node2) return

View File

@@ -36,7 +36,7 @@
initialize_directions = NORTH|SOUTH initialize_directions = NORTH|SOUTH
Destroy() Destroy()
loc = null . = ..()
if(node1) if(node1)
node1.disconnect(src) node1.disconnect(src)
@@ -48,8 +48,6 @@
node1 = null node1 = null
node2 = null node2 = null
..()
process() process()
..() ..()
if(anchored && !(stat&BROKEN)) if(anchored && !(stat&BROKEN))

View File

@@ -28,7 +28,7 @@
input = null input = null
output = null output = null
filters.Cut() filters.Cut()
..() return ..()
/obj/machinery/atmospherics/omni/filter/sort_ports() /obj/machinery/atmospherics/omni/filter/sort_ports()
for(var/datum/omni_port/P in ports) for(var/datum/omni_port/P in ports)

View File

@@ -61,7 +61,7 @@
return null return null
/obj/machinery/atmospherics/portables_connector/Destroy() /obj/machinery/atmospherics/portables_connector/Destroy()
loc = null . = ..()
if(connected_device) if(connected_device)
connected_device.disconnect() connected_device.disconnect()
@@ -72,8 +72,6 @@
node = null node = null
..()
/obj/machinery/atmospherics/portables_connector/initialize() /obj/machinery/atmospherics/portables_connector/initialize()
if(node) return if(node) return

View File

@@ -51,7 +51,7 @@ obj/machinery/atmospherics/trinary
return null return null
Destroy() Destroy()
loc = null . = ..()
if(node1) if(node1)
node1.disconnect(src) node1.disconnect(src)
@@ -67,8 +67,6 @@ obj/machinery/atmospherics/trinary
node2 = null node2 = null
node3 = null node3 = null
..()
initialize() initialize()
if(node1 && node2 && node3) return if(node1 && node2 && node3) return

View File

@@ -100,7 +100,7 @@
return null return null
/obj/machinery/atmospherics/tvalve/Destroy() /obj/machinery/atmospherics/tvalve/Destroy()
loc = null . = ..()
if(node1) if(node1)
node1.disconnect(src) node1.disconnect(src)
@@ -116,8 +116,6 @@
node2 = null node2 = null
node3 = null node3 = null
..()
/obj/machinery/atmospherics/tvalve/proc/go_to_side() /obj/machinery/atmospherics/tvalve/proc/go_to_side()
if(state) return 0 if(state) return 0

View File

@@ -31,7 +31,7 @@
return null return null
Destroy() Destroy()
loc = null . = ..()
if(node) if(node)
node.disconnect(src) node.disconnect(src)
@@ -39,8 +39,6 @@
node = null node = null
..()
initialize() initialize()
if(node) return if(node) return

View File

@@ -80,7 +80,10 @@
/obj/machinery/atmospherics/unary/vent_pump/Destroy() /obj/machinery/atmospherics/unary/vent_pump/Destroy()
unregister_radio(src, frequency) unregister_radio(src, frequency)
..() if(initial_loc)
initial_loc.air_vent_info -= id_tag
initial_loc.air_vent_names -= id_tag
return ..()
/obj/machinery/atmospherics/unary/vent_pump/high_volume /obj/machinery/atmospherics/unary/vent_pump/high_volume
name = "Large Air Vent" name = "Large Air Vent"
@@ -414,13 +417,6 @@
new /obj/item/pipe(loc, make_from=src) new /obj/item/pipe(loc, make_from=src)
qdel(src) qdel(src)
/obj/machinery/atmospherics/unary/vent_pump/Destroy()
if(initial_loc)
initial_loc.air_vent_info -= id_tag
initial_loc.air_vent_names -= id_tag
..()
return
#undef DEFAULT_PRESSURE_DELTA #undef DEFAULT_PRESSURE_DELTA
#undef EXTERNAL_PRESSURE_BOUND #undef EXTERNAL_PRESSURE_BOUND

View File

@@ -44,8 +44,10 @@
/obj/machinery/atmospherics/unary/vent_scrubber/Destroy() /obj/machinery/atmospherics/unary/vent_scrubber/Destroy()
unregister_radio(src, frequency) unregister_radio(src, frequency)
..() if(initial_loc)
initial_loc.air_scrub_info -= id_tag
initial_loc.air_scrub_names -= id_tag
return ..()
/obj/machinery/atmospherics/unary/vent_scrubber/update_icon(var/safety = 0) /obj/machinery/atmospherics/unary/vent_scrubber/update_icon(var/safety = 0)
if(!check_icon_cache()) if(!check_icon_cache())
@@ -285,10 +287,3 @@
user << "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W" user << "A small gauge in the corner reads [round(last_flow_rate, 0.1)] L/s; [round(last_power_draw)] W"
else else
user << "You are too far away to read the gauge." user << "You are too far away to read the gauge."
/obj/machinery/atmospherics/unary/vent_scrubber/Destroy()
if(initial_loc)
initial_loc.air_scrub_info -= id_tag
initial_loc.air_scrub_names -= id_tag
..()
return

View File

@@ -72,7 +72,7 @@
return null return null
/obj/machinery/atmospherics/valve/Destroy() /obj/machinery/atmospherics/valve/Destroy()
loc = null . = ..()
if(node1) if(node1)
node1.disconnect(src) node1.disconnect(src)
@@ -84,8 +84,6 @@
node1 = null node1 = null
node2 = null node2 = null
..()
/obj/machinery/atmospherics/valve/proc/open() /obj/machinery/atmospherics/valve/proc/open()
if(open) return 0 if(open) return 0

View File

@@ -10,14 +10,12 @@ datum/pipeline
var/alert_pressure = 0 var/alert_pressure = 0
Destroy() Destroy()
if(network) qdel_null(network)
qdel(network)
if(air && air.volume) if(air && air.volume)
temporarily_store_air() temporarily_store_air()
qdel(air)
..() . = ..()
proc/process()//This use to be called called from the pipe networks proc/process()//This use to be called called from the pipe networks