Fixes shoddy math & assumptions causing APCs in sufficiently high-power-requiring rooms to work forever (#14896)
* Fixes shoddy math & assumptions causing bad * i typed it. i know it did.
This commit is contained in:
@@ -1389,13 +1389,7 @@
|
||||
charging = APC_NOT_CHARGING
|
||||
chargecount = 0
|
||||
longtermpower = max(-10,longtermpower - 2)
|
||||
if(cell.charge >= cur_used)
|
||||
cell.use(GLOB.CELLRATE * cur_used)
|
||||
else
|
||||
// This turns everything off in the case that there is still a charge left on the battery, just not enough to run the room.
|
||||
equipment = autoset(equipment, 0)
|
||||
lighting = autoset(lighting, 0)
|
||||
environ = autoset(environ, 0)
|
||||
cell.use(min(GLOB.CELLRATE * cur_used, cell.charge))
|
||||
|
||||
// set channels based on remaining charge
|
||||
|
||||
|
||||
Reference in New Issue
Block a user