mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
Merge remote-tracking branch 'upstream/master' into dev-freeze
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
var/frequency = 1439
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
var/hibernate = 0 //Do we even process?
|
||||
var/scrubbing = 1 //0 = siphoning, 1 = scrubbing
|
||||
var/list/scrubbing_gas = list("carbon_dioxide")
|
||||
|
||||
@@ -126,8 +127,8 @@
|
||||
/obj/machinery/atmospherics/unary/vent_scrubber/process()
|
||||
..()
|
||||
|
||||
last_power_draw = 0
|
||||
last_flow_rate = 0
|
||||
if (hibernate)
|
||||
return 1
|
||||
|
||||
if (!node)
|
||||
use_power = 0
|
||||
@@ -149,6 +150,12 @@
|
||||
|
||||
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)
|
||||
last_power_draw = power_draw
|
||||
use_power(power_draw)
|
||||
|
||||
Reference in New Issue
Block a user