Asking for more energy than a cell has stored now drains the cell.

Fixes #9252.
This commit is contained in:
PsiOmega
2015-05-13 23:04:33 +02:00
parent 2d743465a8
commit 3d1b671703

View File

@@ -42,10 +42,8 @@
if(rigged && amount > 0) if(rigged && amount > 0)
explode() explode()
return 0 return 0
charge = max(0, charge - amount)
if(charge < amount) return 0 return charge
charge = (charge - amount)
return 1
// recharge the cell // recharge the cell
/obj/item/weapon/cell/proc/give(var/amount) /obj/item/weapon/cell/proc/give(var/amount)