diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index 9e18d8b465..ea95b08269 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -256,9 +256,9 @@ input_available = terminal.surplus() if(inputting) - if(input_available > 0 && input_available >= input_level) // if there's power available, try to charge + if(input_available > 0) // if there's power available, try to charge - var/load = min((capacity-charge)/SMESRATE, input_level) // charge at set rate, limited to spare capacity + var/load = min(min((capacity-charge)/SMESRATE, input_level), input_available) // charge at set rate, limited to spare capacity charge += load * SMESRATE // increase the charge @@ -268,7 +268,7 @@ inputting = 0 // stop inputting else - if(input_attempt && input_available > 0 && input_available >= input_level) + if(input_attempt && input_available > 0) inputting = 1 else inputting = 0