mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Asking for more energy than a cell has stored now drains the cell.
Fixes #9252.
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user