Cleans up defines

Replaces bitflag values with hex literals. Some other miscellaneous
cleanup.
This commit is contained in:
mwerezak
2015-07-10 20:48:38 -04:00
committed by HarpyEagle
parent 2947a062a8
commit d3a40f4269
15 changed files with 234 additions and 236 deletions
+3 -2
View File
@@ -104,6 +104,7 @@
var/global/list/status_overlays_equipment
var/global/list/status_overlays_lighting
var/global/list/status_overlays_environ
var/chargelevel = CHARGELEVEL_DEFAULT // Cap for how fast APC cells charge, as a percentage-per-tick (0.01 means cellcharge is capped to 1% per second)
/obj/machinery/power/apc/updateDialog()
if (stat & (BROKEN|MAINT))
@@ -1022,7 +1023,7 @@
if(src.attempt_charging())
if(excess > 0) // check to make sure we have enough to charge
// Max charge is capped to % per second constant
var/ch = min(excess*CELLRATE, cell.maxcharge*CHARGELEVEL)
var/ch = min(excess*CELLRATE, cell.maxcharge*chargelevel)
ch = draw_power(ch/CELLRATE) // Removes the power we're taking from the grid
cell.give(ch*CELLRATE) // actually recharge the cell
@@ -1039,7 +1040,7 @@
if(chargemode)
if(!charging)
if(excess > cell.maxcharge*CHARGELEVEL)
if(excess > cell.maxcharge*chargelevel)
chargecount++
else
chargecount = 0