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:
co-authored by
Claude Opus 5.5
parent
65534cfd15
commit
f247d19325
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user