P06-01: Fix review r01 findings for A06 reserve

Settle Mana raised above capacity between boundaries as recorded overflow
instead of rejecting saves or latching a fault, exclude destroyed facilities
from upkeep demand, and keep the depletion drill's outage sustained.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Takeshi
2026-10-19 20:56:57 +09:00
co-authored by Claude Opus 5.5
parent 65534cfd15
commit f247d19325
10 changed files with 104 additions and 21 deletions
+4 -3
View File
@@ -231,11 +231,12 @@ func get_storage_current(node_id: StringName) -> int:
return int(_nodes[node_id][&"current"])
## Upkeep demand of every registered consumer, including disabled ones.
func get_total_consumer_demand() -> int:
## Upkeep demand of every registered consumer, including disabled ones,
## except the given consumer ids (for example destroyed facilities).
func get_total_consumer_demand(excluded_ids: Array = []) -> int:
var total := 0
for node_id: StringName in _nodes:
if int(_nodes[node_id][&"kind"]) == NodeKind.CONSUMER:
if int(_nodes[node_id][&"kind"]) == NodeKind.CONSUMER and not node_id in excluded_ids:
total += int(_nodes[node_id][&"demand"])
return total