mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-18 10:34:10 +01:00
Cleans up defines
Replaces bitflag values with hex literals. Some other miscellaneous cleanup.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user