P06-01: Implement approved A06 finite Mana reserve (MP-01-r02 recommended)
Initial 100, capacity 300, world tree +20 per 10 game minutes. Each boundary pays registered upkeep demand before storing surplus; overflow is discarded and recorded, 0 stops the whole tower. Furnace offers are judged after generation and demand payment. New saves carry mana_reserve and Operations rollback includes it; legacy saves keep a 0..300 amount and reject others. Outage tests that relied on Mana 0 persisting now hold the outage with a disabled demand sink, since the world tree recovers at the next boundary. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
c366012446
commit
ae0f998ff4
@@ -231,6 +231,15 @@ 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:
|
||||
var total := 0
|
||||
for node_id: StringName in _nodes:
|
||||
if int(_nodes[node_id][&"kind"]) == NodeKind.CONSUMER:
|
||||
total += int(_nodes[node_id][&"demand"])
|
||||
return total
|
||||
|
||||
|
||||
func get_last_report() -> Dictionary:
|
||||
return _last_report.duplicate(true)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user