[MIRROR] Kills _globalvars/misc.dm (#7152)

* Kills _globalvars/misc.dm

* aaa

Co-authored-by: tralezab <40974010+tralezab@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
This commit is contained in:
SkyratBot
2021-07-28 22:03:21 +01:00
committed by GitHub
co-authored by tralezab Gandalf
parent eda8512a83
commit f8f51cbd86
22 changed files with 108 additions and 96 deletions
@@ -13,10 +13,10 @@
if(battery_module && battery_module.battery && battery_module.battery.charge)
var/obj/item/stock_parts/cell/cell = battery_module.battery
if(cell.use(amount * GLOB.CELLRATE))
if(cell.use(amount JOULES))
return TRUE
else // Discharge the cell anyway.
cell.use(min(amount*GLOB.CELLRATE, cell.charge))
cell.use(min(amount JOULES, cell.charge))
return FALSE
return FALSE