mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Omni-devices should no longer go and turn themselves off permanently in case of power failure.
This commit is contained in:
@@ -58,14 +58,8 @@
|
||||
return 0
|
||||
|
||||
/obj/machinery/atmospherics/omni/filter/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
|
||||
if(!..())
|
||||
return 0
|
||||
|
||||
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*
|
||||
|
||||
@@ -98,14 +98,8 @@
|
||||
return 0
|
||||
|
||||
/obj/machinery/atmospherics/omni/mixer/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
|
||||
if(!..())
|
||||
return 0
|
||||
|
||||
//Figure out the amount of moles to transfer
|
||||
var/transfer_moles = 0
|
||||
|
||||
@@ -50,10 +50,8 @@
|
||||
/obj/machinery/atmospherics/omni/update_icon()
|
||||
if(stat & NOPOWER)
|
||||
overlays = overlays_off
|
||||
on = 0
|
||||
else if(error_check())
|
||||
overlays = overlays_error
|
||||
on = 0
|
||||
else
|
||||
overlays = on ? (overlays_on) : (overlays_off)
|
||||
|
||||
@@ -64,6 +62,16 @@
|
||||
/obj/machinery/atmospherics/omni/proc/error_check()
|
||||
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()
|
||||
var/old_stat = stat
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user