[NO GBP]Fixes static power usage not always drawing the remaining energy of an APC cell. (#82205)

## About The Pull Request
Makes APC static power draw consume the remaining energy of the cell if
there's not enough energy.
## Why It's Good For The Game
Prevents a niche issue where an area composed entirely of static power
users with no dynamic users from running forever with no power supply.
## Changelog
🆑
fix: Fixes static power usage from being able to not draw power.
/🆑
This commit is contained in:
Pickle-Coding
2024-03-25 16:26:39 +00:00
committed by GitHub
parent 8aa93de044
commit 047470c7be
+1 -1
View File
@@ -699,7 +699,7 @@
terminal?.add_load(grid_used)
var/cell_used = 0
if(amount > grid_used)
cell_used += cell.use(amount - grid_used)
cell_used += cell.use(amount - grid_used, force = TRUE)
return grid_used + cell_used
/// Draws power from the connected grid. When there isn't enough surplus energy from the grid, draws the rest of the demand from its cell. Returns the energy used.