Powernet Tweaks

This commit is contained in:
Fox-McCloud
2015-06-14 17:21:01 -04:00
parent 8e3eec8c6a
commit 3f70dc58d6
8 changed files with 59 additions and 94 deletions
+2 -2
View File
@@ -97,14 +97,14 @@
process()
if(attached)
var/datum/powernet/PN = attached.get_powernet()
var/datum/powernet/PN = attached.powernet
if(PN)
set_light(12)
// found a powernet, so drain up to max power from it
var/drained = min ( drain_rate, PN.avail )
PN.newload += drained
PN.load += drained
power_drained += drained
// if tried to drain more than available on powernet