mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-21 13:05:36 +01:00
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:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user