Merge pull request #9254 from PsiOmegaDelta/CellDepletion

Using more energy than a cell has stored now drains the cell.
This commit is contained in:
Chinsky
2015-05-14 04:17:43 +03:00
2 changed files with 7 additions and 4 deletions
+2 -4
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)