Powernet Refactor

This commit is contained in:
Fox McCloud
2019-04-27 02:06:04 -04:00
parent 0fb164d041
commit d0a077f9d5
18 changed files with 415 additions and 428 deletions

View File

@@ -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 * CELLRATE))
if(cell.use(amount * GLOB.CELLRATE))
return TRUE
else // Discharge the cell anyway.
cell.use(min(amount*CELLRATE, cell.charge))
cell.use(min(amount*GLOB.CELLRATE, cell.charge))
return FALSE
return FALSE