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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -80,7 +80,10 @@
/obj/machinery/atmospherics/unary/vent_pump/Destroy()
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
name = "Large Air Vent"
@@ -414,13 +417,6 @@
new /obj/item/pipe(loc, make_from=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 EXTERNAL_PRESSURE_BOUND

View File

@@ -44,8 +44,10 @@
/obj/machinery/atmospherics/unary/vent_scrubber/Destroy()
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)
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"
else
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
/obj/machinery/atmospherics/valve/Destroy()
loc = null
. = ..()
if(node1)
node1.disconnect(src)
@@ -84,8 +84,6 @@
node1 = null
node2 = null
..()
/obj/machinery/atmospherics/valve/proc/open()
if(open) return 0

View File

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