Omni-devices should no longer go and turn themselves off permanently in case of power failure.

This commit is contained in:
PsiOmega
2014-09-13 10:23:18 +02:00
parent 0ec866900f
commit 1efa1d1ceb
3 changed files with 38 additions and 42 deletions

View File

@@ -58,14 +58,8 @@
return 0 return 0
/obj/machinery/atmospherics/omni/filter/process() /obj/machinery/atmospherics/omni/filter/process()
..() if(!..())
if(error_check()) return 0
on = 0
if((stat & (NOPOWER|BROKEN)) || !on)
update_use_power(0) //usually we get here because a player turned a pump off - definitely want to update.
last_flow_rate = 0
return
var/datum/gas_mixture/output_air = output.air //BYOND doesn't like referencing "output.air.return_pressure()" so we need to make a direct reference var/datum/gas_mixture/output_air = output.air //BYOND doesn't like referencing "output.air.return_pressure()" so we need to make a direct reference
var/datum/gas_mixture/input_air = input.air // it's completely happy with them if they're in a loop though i.e. "P.air.return_pressure()"... *shrug* var/datum/gas_mixture/input_air = input.air // it's completely happy with them if they're in a loop though i.e. "P.air.return_pressure()"... *shrug*

View File

@@ -98,14 +98,8 @@
return 0 return 0
/obj/machinery/atmospherics/omni/mixer/process() /obj/machinery/atmospherics/omni/mixer/process()
..() if(!..())
if(error_check()) return 0
on = 0
if((stat & (NOPOWER|BROKEN)) || !on)
update_use_power(0) //usually we get here because a player turned a pump off - definitely want to update.
last_flow_rate = 0
return
//Figure out the amount of moles to transfer //Figure out the amount of moles to transfer
var/transfer_moles = 0 var/transfer_moles = 0

View File

@@ -50,10 +50,8 @@
/obj/machinery/atmospherics/omni/update_icon() /obj/machinery/atmospherics/omni/update_icon()
if(stat & NOPOWER) if(stat & NOPOWER)
overlays = overlays_off overlays = overlays_off
on = 0
else if(error_check()) else if(error_check())
overlays = overlays_error overlays = overlays_error
on = 0
else else
overlays = on ? (overlays_on) : (overlays_off) overlays = on ? (overlays_on) : (overlays_off)
@@ -64,6 +62,16 @@
/obj/machinery/atmospherics/omni/proc/error_check() /obj/machinery/atmospherics/omni/proc/error_check()
return return
/obj/machinery/atmospherics/omni/process()
if(error_check())
on = 0
if((stat & (NOPOWER|BROKEN)) || !on)
update_use_power(0) //usually we get here because a player turned a pump off - definitely want to update.
last_flow_rate = 0
return 0
return 1
/obj/machinery/atmospherics/omni/power_change() /obj/machinery/atmospherics/omni/power_change()
var/old_stat = stat var/old_stat = stat
..() ..()