you refill the modsuit plasma core with all your plasma at once (#67242)

* The Mining MODsuit will now recharge with as many plasma as you can put in it.
This commit is contained in:
Fikou
2022-05-27 18:33:52 +02:00
committed by GitHub
parent 2e87df46cd
commit f9de70be85
+5 -4
View File
@@ -330,11 +330,12 @@
return COMPONENT_NO_AFTERATTACK
return NONE
/obj/item/mod/core/plasma/proc/charge_plasma(obj/item/attacking_item, mob/user)
if(!istype(attacking_item, /obj/item/stack/ore/plasma))
/obj/item/mod/core/plasma/proc/charge_plasma(obj/item/stack/ore/plasma/plasma, mob/user)
if(!istype(plasma))
return FALSE
if(!attacking_item.use(1))
var/uses_needed = min(plasma.amount, round((max_charge_amount() - charge_amount()) / charge_given))
if(!plasma.use(uses_needed))
return FALSE
add_charge(charge_given)
add_charge(uses_needed*charge_given)
balloon_alert(user, "core refueled")
return TRUE