mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Merge pull request #41787 from subject217/pcfix
Fixes an issue wherein plasma cutters accepted infinite plasma
This commit is contained in:
@@ -144,13 +144,17 @@
|
||||
to_chat(user, "<span class='notice'>[src] is [round(cell.percent())]% charged.</span>")
|
||||
|
||||
/obj/item/gun/energy/plasmacutter/attackby(obj/item/I, mob/user)
|
||||
var/charge_multiplier = 0 //2 = Refined stack, 1 = Ore
|
||||
if(istype(I, /obj/item/stack/sheet/mineral/plasma))
|
||||
charge_multiplier = 2
|
||||
if(istype(I, /obj/item/stack/ore/plasma))
|
||||
charge_multiplier = 1
|
||||
if(charge_multiplier)
|
||||
if(cell.charge == cell.maxcharge)
|
||||
to_chat(user, "<span class='notice'>You try to insert [I] into [src], but it's fully charged.</span>") //my cell is round and full
|
||||
return
|
||||
I.use(1)
|
||||
cell.give(1000)
|
||||
to_chat(user, "<span class='notice'>You insert [I] in [src], recharging it.</span>")
|
||||
else if(istype(I, /obj/item/stack/ore/plasma))
|
||||
I.use(1)
|
||||
cell.give(500)
|
||||
cell.give(500*charge_multiplier)
|
||||
to_chat(user, "<span class='notice'>You insert [I] in [src], recharging it.</span>")
|
||||
else
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user