SMESes should now work with self-charging cells (tg#51240)

This commit is contained in:
Detective Google
2020-06-22 15:56:51 -05:00
parent a0a4007332
commit 099f594a30
+5
View File
@@ -228,6 +228,11 @@
var/last_chrg = inputting
var/last_onln = outputting
//check for self-recharging cells in stock parts and use them to self-charge
for(var/obj/item/stock_parts/cell/C in component_parts)
if(C.self_recharge)
charge += min(capacity-charge, C.chargerate) // If capacity-charge is smaller than the attempted charge rate, this avoids overcharging
//inputting
if(terminal && input_attempt)
input_available = terminal.surplus()