Powernets now tracks load added between power ticks. (#40216)

* Powernet non-machine processing changes.

* forgot an =

* Reverts floodlight changes.

* Clamps surplus() to valid values.
This commit is contained in:
skoglol
2018-09-14 13:05:21 +02:00
committed by AnturK
parent da869cb780
commit 817c9c0ffc
9 changed files with 58 additions and 14 deletions
+2 -2
View File
@@ -160,7 +160,7 @@
update_icon()
return
if(active == TRUE)
if(!active_power_usage || avail(active_power_usage))
if(!active_power_usage || surplus() >= active_power_usage)
add_load(active_power_usage)
if(!powered)
powered = TRUE
@@ -189,7 +189,7 @@
return FALSE
if(state != EMITTER_WELDED)
return FALSE
if(avail(active_power_usage))
if(surplus() >= active_power_usage)
add_load(active_power_usage)
fire_beam()