mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-27 06:00:23 +01:00
Atmos machine update
Takes a pass at updating ATMOSPHERICS to take advantage of the new powernet changes. Also removes var/on definitions from many atmos machines. Machines generally shouldn't be doing "on" things if they aren't using power, and most players don't expect a machine to use power if it isn't "on," so I guess this is fair game. Also, further refactoring.
This commit is contained in:
@@ -1007,7 +1007,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
Pump.air2.gas["nitrogen"] = 3750 //The contents of 2 canisters.
|
||||
Pump.air2.temperature = 50
|
||||
Pump.air2.update_values()
|
||||
Pump.on=1
|
||||
Pump.use_power=1
|
||||
Pump.target_pressure = 4500
|
||||
Pump.update_icon()
|
||||
|
||||
|
||||
@@ -364,7 +364,7 @@
|
||||
|
||||
if(mode != 1) //if off or ready, no need to charge
|
||||
update_use_power(1)
|
||||
else if(air_contents.return_pressure() >= SEND_PRESSURE)
|
||||
else if(air_contents.return_pressure() >= SEND_PRESSURE)
|
||||
mode = 2 //if full enough, switch to ready mode
|
||||
update()
|
||||
else
|
||||
@@ -383,11 +383,8 @@
|
||||
var/transfer_moles = (PUMP_MAX_FLOW_RATE/env.volume)*env.total_moles //group_multiplier is divided out here
|
||||
power_draw = pump_gas(src, env, air_contents, transfer_moles, active_power_usage)
|
||||
|
||||
if (power_draw < 0)
|
||||
//update_use_power(0)
|
||||
use_power = 1 //don't force update - easier on CPU
|
||||
else
|
||||
handle_power_draw(power_draw)
|
||||
if (power_draw > 0)
|
||||
use_power(power_draw)
|
||||
|
||||
// perform a flush
|
||||
/obj/machinery/disposal/proc/flush()
|
||||
|
||||
Reference in New Issue
Block a user