fixes components not gc'ing; minor tweaks to QDEL_HINT_FINDREFERENCE

This commit is contained in:
duncathan
2015-09-04 22:09:01 -06:00
parent ca60821e88
commit 4fc54c238c
5 changed files with 60 additions and 37 deletions
@@ -2,6 +2,9 @@
#define INT_BOUND 2
#define NO_BOUND 3
#define SIPHONING 0
#define RELEASING 1
/obj/machinery/atmospherics/components/unary/vent_pump
icon_state = "vent_map"
@@ -19,12 +22,12 @@
var/id_tag = null
var/on = 0
var/pump_direction = 1 //0 = siphoning, 1 = releasing
var/pump_direction = RELEASING
var/external_pressure_bound = ONE_ATMOSPHERE
var/internal_pressure_bound = 0
var/pressure_checks = 1
var/pressure_checks = EXT_BOUND
//EXT_BOUND: Do not pass external_pressure_bound
//INT_BOUND: Do not pass internal_pressure_bound
//NO_BOUND: Do not pass either
@@ -40,7 +43,7 @@
icon_state = "vent_out"
/obj/machinery/atmospherics/components/unary/vent_pump/siphon
pump_direction = 0
pump_direction = SIPHONING
/obj/machinery/atmospherics/components/unary/vent_pump/siphon/on
on = 1
@@ -88,9 +91,9 @@
icon_state = "vent_off"
return
if(pump_direction)
if(pump_direction & RELEASING)
icon_state = "vent_out"
else
if(pump_direction & SIPHONING)
icon_state = "vent_in"
/obj/machinery/atmospherics/components/unary/vent_pump/process_atmos()
@@ -110,7 +113,7 @@
var/datum/gas_mixture/environment = loc.return_air()
var/environment_pressure = environment.return_pressure()
if(pump_direction) //internal -> external
if(pump_direction & RELEASING) //internal -> external
var/pressure_delta = 10000
if(pressure_checks&EXT_BOUND)
@@ -127,7 +130,7 @@
loc.assume_air(removed)
air_update_turf()
else //external -> internal
if(pump_direction & SIPHONING) //external -> internal
var/pressure_delta = 10000
if(pressure_checks&EXT_BOUND)
pressure_delta = min(pressure_delta, (environment_pressure - external_pressure_bound))
@@ -206,11 +209,11 @@
if("purge" in signal.data)
pressure_checks &= ~EXT_BOUND
pump_direction = 0
pump_direction = SIPHONING
if("stabalize" in signal.data)
pressure_checks |= EXT_BOUND
pump_direction = 1
pump_direction = RELEASING
if("power" in signal.data)
on = text2num(signal.data["power"])
@@ -315,3 +318,10 @@
/obj/machinery/atmospherics/components/unary/vent_pump/can_crawl_through()
return !welded
#undef INT_BOUND
#undef EXT_BOUND
#undef NO_BOUND
#undef SIPHONING
#undef RELEASING
@@ -1,3 +1,6 @@
#define SIPHONING 0
#define SCRUBBING 1
/obj/machinery/atmospherics/components/unary/vent_scrubber
icon_state = "scrub_map"
@@ -22,7 +25,7 @@
var/list/turf/simulated/adjacent_turfs = list()
var/on = 0
var/scrubbing = 1 //0 = siphoning, 1 = scrubbing
var/scrubbing = SCRUBBING //0 = siphoning, 1 = scrubbing
var/scrub_CO2 = 1
var/scrub_Toxins = 0
var/scrub_N2O = 0
@@ -66,14 +69,14 @@
var/amount = idle_power_usage
if (scrubbing)
if(scrubbing & SCRUBBING)
if (scrub_CO2)
amount += idle_power_usage
if (scrub_Toxins)
amount += idle_power_usage
if (scrub_N2O)
amount += idle_power_usage
else
if(scrubbing & SIPHONING)
amount = active_power_usage
if (widenet)
@@ -94,9 +97,9 @@
icon_state = "scrub_off"
return
if(scrubbing)
if(scrubbing & SCRUBBING)
icon_state = "scrub_on"
else
if(scrubbing & SIPHONING)
icon_state = "scrub_purge"
/obj/machinery/atmospherics/components/unary/vent_scrubber/proc/set_frequency(new_frequency)
@@ -165,7 +168,7 @@
var/datum/gas_mixture/environment = tile.return_air()
var/datum/gas_mixture/air_contents = AIR1
if(scrubbing)
if(scrubbing & SCRUBBING)
if((environment.toxins>0) || (environment.carbon_dioxide>0) || (environment.trace_gases.len>0))
var/transfer_moles = min(1, volume_rate/environment.volume)*environment.total_moles()
@@ -200,7 +203,7 @@
tile.assume_air(removed)
tile.air_update_turf()
else //Just siphoning all air
if(scrubbing & SIPHONING) //Just siphoning all air
if (air_contents.return_pressure()>=50*ONE_ATMOSPHERE)
return
@@ -316,3 +319,6 @@
/obj/machinery/atmospherics/components/unary/vent_scrubber/can_crawl_through()
return !welded
#undef SIPHONING
#undef SCRUBBING