Skip to content

Commit

Permalink
you refill the modsuit plasma core with all your plasma at once (#67242)
Browse files Browse the repository at this point in the history
* The Mining MODsuit will now recharge with as many plasma as you can put in it.
  • Loading branch information
Fikou committed May 27, 2022
1 parent 2e87df4 commit f9de70b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions code/modules/mod/mod_core.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit f9de70b

Please sign in to comment.