makes atmos machinery return properly from destroy()

This commit is contained in:
duncathan
2015-08-30 23:18:03 -06:00
parent f7363fc737
commit b5d6e00cea
15 changed files with 28 additions and 32 deletions
+1
View File
@@ -52,6 +52,7 @@ Pipelines + Other Objects -> Pipe network
qdel(pipe_vision_img)
..()
return QDEL_HINT_FINDREFERENCE
/obj/machinery/atmospherics/proc/nullifyNode(I)
var/obj/machinery/atmospherics/N = NODE_I
@@ -35,7 +35,7 @@ Acts like a normal vent, but has an input AND output.
/obj/machinery/atmospherics/components/binary/dp_vent_pump/Destroy()
if(radio_controller)
radio_controller.remove_object(src, frequency)
..()
return ..()
/obj/machinery/atmospherics/components/binary/dp_vent_pump/high_volume
name = "large dual-port air vent"
@@ -25,7 +25,7 @@ Passive gate is similar to the regular pump except:
/obj/machinery/atmospherics/components/binary/passive_gate/Destroy()
if(radio_controller)
radio_controller.remove_object(src,frequency)
..()
return ..()
/obj/machinery/atmospherics/components/binary/passive_gate/update_icon_nopipes()
if(!on)
@@ -31,7 +31,7 @@ Thus, the two variables affect pump operation are set in New():
radio_controller.remove_object(src,frequency)
if(radio_connection)
radio_connection = null
..()
return ..()
/obj/machinery/atmospherics/components/binary/pump/on
on = 1
@@ -29,7 +29,7 @@ Thus, the two variables affect pump operation are set in New():
/obj/machinery/atmospherics/components/binary/volume_pump/Destroy()
if(radio_controller)
radio_controller.remove_object(src,frequency)
..()
return ..()
/obj/machinery/atmospherics/components/binary/volume_pump/on
on = 1
@@ -47,7 +47,7 @@ Filter types:
/obj/machinery/atmospherics/components/trinary/filter/Destroy()
if(radio_controller)
radio_controller.remove_object(src,frequency)
..()
return ..()
/obj/machinery/atmospherics/components/trinary/filter/update_icon()
overlays.Cut()
@@ -29,7 +29,7 @@
overlays += getpipeimage('icons/obj/atmospherics/components/trinary_devices.dmi', "cap", direction, node.pipe_color)
continue
overlays += getpipeimage('icons/obj/atmospherics/components/trinary_devices.dmi', "cap", direction)
..()
return ..()
/obj/machinery/atmospherics/components/trinary/mixer/update_icon_nopipes()
if(!(stat & NOPOWER) && on && NODE1 && NODE2 && NODE3)
@@ -44,7 +44,8 @@
if(beaker)
beaker.loc = get_step(loc, SOUTH) //Beaker is carefully ejected from the wreckage of the cryotube
beaker = null
..()
return ..()
/obj/machinery/atmospherics/components/unary/cryo_cell/process_atmos()
..()
var/datum/gas_mixture/air_contents = AIR1
@@ -19,7 +19,7 @@
/obj/machinery/atmospherics/components/unary/outlet_injector/Destroy()
if(radio_controller)
radio_controller.remove_object(src,frequency)
..()
return ..()
/obj/machinery/atmospherics/components/unary/outlet_injector/on
on = 1
@@ -19,7 +19,7 @@
/obj/machinery/atmospherics/components/unary/portables_connector/Destroy()
if(connected_device)
connected_device.disconnect()
..()
return ..()
/obj/machinery/atmospherics/components/unary/portables_connector/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/wrench))
@@ -1,3 +1,4 @@
#define AIR_CONTENTS (25*ONE_ATMOSPHERE)*(air_contents.volume)/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
/obj/machinery/atmospherics/components/unary/tank
icon = 'icons/obj/atmospherics/pipes/pressure_tank.dmi'
icon_state = "generic"
@@ -6,15 +7,19 @@
var/volume = 10000 //in liters, 1 meters by 1 meters by 2 meters
density = 1
/obj/machinery/atmospherics/components/unary/tank/New()
..()
var/datum/gas_mixture/air_contents = AIR1
air_contents.volume = volume
air_contents.temperature = T20C
/obj/machinery/atmospherics/components/unary/tank/carbon_dioxide
name = "pressure tank (Carbon Dioxide)"
/obj/machinery/atmospherics/components/unary/tank/carbon_dioxide/New()
..()
var/datum/gas_mixture/air_contents = AIR1
air_contents.volume = volume
air_contents.temperature = T20C
air_contents.carbon_dioxide = (25*ONE_ATMOSPHERE)*(air_contents.volume)/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
air_contents.carbon_dioxide = AIR_CONTENTS
/obj/machinery/atmospherics/components/unary/tank/toxins
icon_state = "orange"
@@ -23,9 +28,7 @@
/obj/machinery/atmospherics/components/unary/tank/toxins/New()
..()
var/datum/gas_mixture/air_contents = AIR1
air_contents.volume = volume
air_contents.temperature = T20C
air_contents.toxins = (25*ONE_ATMOSPHERE)*(air_contents.volume)/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
air_contents.toxins = AIR_CONTENTS
/obj/machinery/atmospherics/components/unary/tank/oxygen_agent_b
icon_state = "orange_2"
@@ -34,10 +37,8 @@
/obj/machinery/atmospherics/components/unary/tank/oxygen_agent_b/New()
..()
var/datum/gas_mixture/air_contents = AIR1
air_contents.volume = volume
air_contents.temperature = T0C
var/datum/gas/oxygen_agent_b/trace_gas = new
trace_gas.moles = (25*ONE_ATMOSPHERE)*(air_contents.volume)/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
trace_gas.moles = AIR_CONTENTS
air_contents.trace_gases += trace_gas
/obj/machinery/atmospherics/components/unary/tank/oxygen
@@ -47,9 +48,7 @@
/obj/machinery/atmospherics/components/unary/tank/oxygen/New()
..()
var/datum/gas_mixture/air_contents = AIR1
air_contents.volume = volume
air_contents.temperature = T20C
air_contents.oxygen = (25*ONE_ATMOSPHERE)*(air_contents.volume)/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
air_contents.oxygen = AIR_CONTENTS
/obj/machinery/atmospherics/components/unary/tank/nitrogen
icon_state = "red"
@@ -58,9 +57,7 @@
/obj/machinery/atmospherics/components/unary/tank/nitrogen/New()
..()
var/datum/gas_mixture/air_contents = AIR1
air_contents.volume = volume
air_contents.temperature = T20C
air_contents.nitrogen = (25*ONE_ATMOSPHERE)*(air_contents.volume)/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
air_contents.nitrogen = AIR_CONTENTS
/obj/machinery/atmospherics/components/unary/tank/air
icon_state = "grey"
@@ -69,7 +66,5 @@
/obj/machinery/atmospherics/components/unary/tank/air/New()
..()
var/datum/gas_mixture/air_contents = AIR1
air_contents.volume = volume
air_contents.temperature = T20C
air_contents.oxygen = (25*ONE_ATMOSPHERE*O2STANDARD)*(air_contents.volume)/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
air_contents.nitrogen = (25*ONE_ATMOSPHERE*N2STANDARD)*(air_contents.volume)/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
air_contents.oxygen = AIR_CONTENTS
air_contents.nitrogen = AIR_CONTENTS
@@ -65,7 +65,7 @@
initial_loc.air_vent_info -= id_tag
initial_loc.air_vent_names -= id_tag
initial_loc = null
..()
return ..()
/obj/machinery/atmospherics/components/unary/vent_pump/high_volume
name = "large air vent"
@@ -56,7 +56,7 @@
initial_loc = null
for(var/I in adjacent_turfs)
I = null
..()
return ..()
/obj/machinery/atmospherics/components/unary/vent_scrubber/auto_use_power()
if(!powered(power_channel))
return 0