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)
explode()
return 0
if(charge < amount) return 0
charge = (charge - amount)
return 1
charge = max(0, charge - amount)
return charge
// recharge the cell
/obj/item/weapon/cell/proc/give(var/amount)