P06-03: Show Mana supply, consumption and storage; prove new-PID recovery

HUD tooltip reports world tree supply, upkeep consumption, net, stored amount
and the last boundary's shortage/overflow. A writer/reader pair saves mid-outage,
recovers in a new process and matches the writer exactly while DESTROYED and
RAIDED suspensions stay in place.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Takeshi
2026-10-20 08:59:59 +09:00
co-authored by Claude Opus 5.5
parent db5ca62e42
commit 826ef606df
5 changed files with 187 additions and 1 deletions
+14
View File
@@ -10741,6 +10741,20 @@ func _reservation_references_are_valid(
return false
return true
## HUD view of the A06 reserve: supply, consumption and storage per interval.
func get_mana_reserve_report() -> Dictionary:
var demand := _mana_reserve_demand()
return {
&"amount": int(_state.get_resource(&"mana")),
&"capacity": ManaReserveCycle.CAPACITY,
&"generation": ManaReserveCycle.WORLD_TREE_GENERATION,
&"interval_minutes": ManaReserveCycle.INTERVAL_MINUTES,
&"demand": demand,
&"net": ManaReserveCycle.WORLD_TREE_GENERATION - demand,
&"last_flow": mana_reserve.get_last_flow(),
}
## A06 upkeep demand: every owned consumer, open or not, except destroyed
## facilities. Removed facilities are already unregistered from the network.
func _mana_reserve_demand() -> int: