mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-23 13:17:03 +01:00
Merge remote-tracking branch 'upstream/dev' into span_class=notice
Conflicts: code/ZAS/Diagnostic.dm code/game/machinery/computer3/laptop.dm code/game/machinery/requests_console.dm code/game/objects/items/stacks/tiles/plasteel.dm
This commit is contained in:
@@ -130,7 +130,7 @@
|
||||
var/total_specific_power = 0 //the power required to remove one mole of filterable gas
|
||||
for (var/g in filtering)
|
||||
var/ratio = source.gas[g]/total_filterable_moles //this converts the specific power per mole of pure gas to specific power per mole of scrubbed gas
|
||||
total_specific_power = specific_power_gas[g]*ratio
|
||||
total_specific_power += specific_power_gas[g]*ratio
|
||||
|
||||
//Figure out how much of each gas to filter
|
||||
if (isnull(total_transfer_moles))
|
||||
|
||||
@@ -85,6 +85,9 @@ obj/machinery/atmospherics/proc/check_connect_types(obj/machinery/atmospherics/a
|
||||
return node.pipe_color
|
||||
|
||||
/obj/machinery/atmospherics/process()
|
||||
last_flow_rate = 0
|
||||
last_power_draw = 0
|
||||
|
||||
build_network()
|
||||
|
||||
/obj/machinery/atmospherics/proc/network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference)
|
||||
|
||||
@@ -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