mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
Copies vent pump hibernation over to scrubbers
This commit is contained in:
@@ -17,6 +17,7 @@
|
|||||||
var/frequency = 1439
|
var/frequency = 1439
|
||||||
var/datum/radio_frequency/radio_connection
|
var/datum/radio_frequency/radio_connection
|
||||||
|
|
||||||
|
var/hibernate = 0 //Do we even process?
|
||||||
var/scrubbing = 1 //0 = siphoning, 1 = scrubbing
|
var/scrubbing = 1 //0 = siphoning, 1 = scrubbing
|
||||||
var/list/scrubbing_gas = list("carbon_dioxide")
|
var/list/scrubbing_gas = list("carbon_dioxide")
|
||||||
|
|
||||||
@@ -125,8 +126,8 @@
|
|||||||
/obj/machinery/atmospherics/unary/vent_scrubber/process()
|
/obj/machinery/atmospherics/unary/vent_scrubber/process()
|
||||||
..()
|
..()
|
||||||
|
|
||||||
last_power_draw = 0
|
if (hibernate)
|
||||||
last_flow_rate = 0
|
return 1
|
||||||
|
|
||||||
if (!node)
|
if (!node)
|
||||||
use_power = 0
|
use_power = 0
|
||||||
@@ -148,6 +149,12 @@
|
|||||||
|
|
||||||
power_draw = pump_gas(src, environment, air_contents, transfer_moles, power_rating)
|
power_draw = pump_gas(src, environment, air_contents, transfer_moles, power_rating)
|
||||||
|
|
||||||
|
if(scrubbing && power_draw < 0 && controller_iteration > 10) //99% of all scrubbers
|
||||||
|
//Fucking hibernate because you ain't doing shit.
|
||||||
|
hibernate = 1
|
||||||
|
spawn(rand(100,200)) //hibernate for 10 or 20 seconds randomly
|
||||||
|
hibernate = 0
|
||||||
|
|
||||||
if (power_draw >= 0)
|
if (power_draw >= 0)
|
||||||
last_power_draw = power_draw
|
last_power_draw = power_draw
|
||||||
use_power(power_draw)
|
use_power(power_draw)
|
||||||
|
|||||||
Reference in New Issue
Block a user