mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
Fix an overcharged smes from breaking charging on other smes.
An overcharged smes could demand negative power from the grid, swamping other SMES and resulting in zero power being distributed.
This commit is contained in:
@@ -154,7 +154,7 @@
|
||||
|
||||
//inputting
|
||||
if(input_attempt && (!input_pulsed && !input_cut) && !grid_check)
|
||||
target_load = min((capacity-charge)/SMESRATE, input_level) // Amount we will request from the powernet.
|
||||
target_load = clamp((capacity-charge)/SMESRATE, 0, input_level) // Amount we will request from the powernet.
|
||||
var/input_available = FALSE
|
||||
for(var/obj/machinery/power/terminal/term in terminals)
|
||||
if(!term.powernet)
|
||||
|
||||
Reference in New Issue
Block a user