mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 04:22:39 +01:00
Power cells now drain to zero (#10385)
This commit is contained in:
@@ -57,12 +57,10 @@
|
||||
return used
|
||||
|
||||
// Checks if the specified amount can be provided. If it can, it removes the amount
|
||||
// from the cell and returns 1. Otherwise does nothing and returns 0.
|
||||
// from the cell and returns 1. Otherwise drains the charge to exactly 0 and returns 0.
|
||||
/obj/item/cell/proc/checked_use(var/amount)
|
||||
if(!check_charge(amount))
|
||||
return 0
|
||||
. = check_charge(amount)
|
||||
use(amount)
|
||||
return 1
|
||||
|
||||
// recharge the cell
|
||||
/obj/item/cell/proc/give(var/amount)
|
||||
|
||||
Reference in New Issue
Block a user