Merge pull request #12582 from Detective-Google/gamer-smes

SMESes should now work with self-charging cells (tg#51240)
This commit is contained in:
silicons
2020-06-24 08:44:19 -07:00
committed by GitHub
+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()