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:
mwerezak
2015-01-02 01:46:18 -05:00
parent 73f9617cef
commit f9344a5a2d
25 changed files with 729 additions and 823 deletions
+1 -1
View File
@@ -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()
+3 -6
View File
@@ -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()