mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +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)
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user