mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-14 09:35:30 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user