Fix construction of HE pipes, Vents, and Scrubbers Plus qdel issues.

The initialize() routines of HE pipes, vents an scrubbers need to be atmos_init() after all.
If you register yourself with radio controller you need to de-register yourself too.
This commit is contained in:
Leshana
2018-01-19 23:21:55 -05:00
parent 169a188ad0
commit e49d87bc2a
11 changed files with 38 additions and 5 deletions
@@ -47,6 +47,10 @@
air2.volume = ATMOS_DEFAULT_VOLUME_PUMP
icon = null
/obj/machinery/atmospherics/binary/dp_vent_pump/Destroy()
unregister_radio(src, frequency)
. = ..()
/obj/machinery/atmospherics/binary/dp_vent_pump/high_volume
name = "Large Dual Port Air Vent"
@@ -29,6 +29,10 @@
air1.volume = ATMOS_DEFAULT_VOLUME_PUMP * 2.5
air2.volume = ATMOS_DEFAULT_VOLUME_PUMP * 2.5
/obj/machinery/atmospherics/binary/passive_gate/Destroy()
unregister_radio(src, frequency)
. = ..()
/obj/machinery/atmospherics/binary/passive_gate/update_icon()
icon_state = (unlocked && flowing)? "on" : "off"
@@ -39,6 +39,10 @@ Thus, the two variables affect pump operation are set in New():
air1.volume = ATMOS_DEFAULT_VOLUME_PUMP
air2.volume = ATMOS_DEFAULT_VOLUME_PUMP
/obj/machinery/atmospherics/binary/pump/Destroy()
unregister_radio(src, frequency)
. = ..()
/obj/machinery/atmospherics/binary/pump/on
icon_state = "map_on"
use_power = 1
@@ -54,6 +54,10 @@
air2.volume = ATMOS_DEFAULT_VOLUME_FILTER
air3.volume = ATMOS_DEFAULT_VOLUME_FILTER
/obj/machinery/atmospherics/trinary/atmos_filter/Destroy()
unregister_radio(src, frequency)
. = ..()
/obj/machinery/atmospherics/trinary/atmos_filter/update_icon()
if(istype(src, /obj/machinery/atmospherics/trinary/atmos_filter/m_filter))
icon_state = "m"
+8
View File
@@ -277,6 +277,10 @@
var/id = null
var/datum/radio_frequency/radio_connection
/obj/machinery/atmospherics/tvalve/digital/Destroy()
unregister_radio(src, frequency)
. = ..()
/obj/machinery/atmospherics/tvalve/digital/bypass
icon_state = "map_tvalve1"
state = 1
@@ -415,6 +419,10 @@
var/id = null
var/datum/radio_frequency/radio_connection
/obj/machinery/atmospherics/tvalve/mirrored/digital/Destroy()
unregister_radio(src, frequency)
. = ..()
/obj/machinery/atmospherics/tvalve/mirrored/digital/bypass
icon_state = "map_tvalvem1"
state = 1
@@ -28,6 +28,10 @@
..()
air_contents.volume = ATMOS_DEFAULT_VOLUME_PUMP + 500 //Give it a small reservoir for injecting. Also allows it to have a higher flow rate limit than vent pumps, to differentiate injectors a bit more.
/obj/machinery/atmospherics/unary/outlet_injector/Destroy()
unregister_radio(src, frequency)
. = ..()
/obj/machinery/atmospherics/unary/outlet_injector/update_icon()
if(!powered())
icon_state = "off"
@@ -256,7 +256,7 @@
return 1
/obj/machinery/atmospherics/unary/vent_pump/initialize()
/obj/machinery/atmospherics/unary/vent_pump/atmos_init()
..()
//some vents work his own special way
@@ -119,7 +119,7 @@
return 1
/obj/machinery/atmospherics/unary/vent_scrubber/initialize()
/obj/machinery/atmospherics/unary/vent_scrubber/atmos_init()
..()
radio_filter_in = frequency==initial(frequency)?(RADIO_FROM_AIRALARM):null
radio_filter_out = frequency==initial(frequency)?(RADIO_TO_AIRALARM):null
+4
View File
@@ -229,6 +229,10 @@
var/id = null
var/datum/radio_frequency/radio_connection
/obj/machinery/atmospherics/valve/digital/Destroy()
unregister_radio(src, frequency)
. = ..()
/obj/machinery/atmospherics/valve/digital/attack_ai(mob/user as mob)
return src.attack_hand(user)
+2 -1
View File
@@ -16,7 +16,8 @@ datum/pipeline
temporarily_store_air()
for(var/obj/machinery/atmospherics/pipe/P in members)
P.parent = null
members = null
edges = null
. = ..()
proc/process()//This use to be called called from the pipe networks
+2 -2
View File
@@ -26,7 +26,7 @@
..()
initialize_directions_he = initialize_directions // The auto-detection from /pipe is good enough for a simple HE pipe
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/initialize()
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/atmos_init()
normalize_dir()
var/node1_dir
var/node2_dir
@@ -135,7 +135,7 @@
initialize_directions_he = WEST
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction/initialize()
/obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction/atmos_init()
for(var/obj/machinery/atmospherics/target in get_step(src,initialize_directions))
if(target.initialize_directions & get_dir(target,src))
node1 = target