fix(@projects/@magic-civilization): 🐛 route tech-web lookup to TurnManager (proof harness)

`GameState.get_tech_web()` no longer exists — the accessor moved to
`TurnManager.get_tech_web()` (turn_manager.gd:132, builds the graph lazily
after DataLoader loads a theme), which is what production tech_tree.gd uses.

- tech_tree_proof.gd:56 — was raising `SCRIPT ERROR: Invalid call.
  Nonexistent function 'get_tech_web'` mid-setup; switched to
  `TurnManager.get_tech_web() as TechWebScript`.
- end_game_stats.gd:241 — same stale call (guarded, so it silently fell to
  null); switched to the live accessor.

culture_tree_proof.gd already used TurnManager.get_culture_web() — unchanged.

Verified on plum (headed render, warm cache): tech_tree_proof exits 0, ZERO
SCRIPT ERROR (was 1), diagnostics print "TechWeb: 115 techs, 10 pillars" +
all 10 domains; screenshot reviewed in conversation.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Natalie 2026-06-18 19:50:45 -05:00
parent 333cf52226
commit 0eaa979171
2 changed files with 2 additions and 2 deletions

View file

@ -238,7 +238,7 @@ func _build_domain_breakdown(player_index: int) -> void:
for child: Node in _domain_list.get_children():
child.queue_free()
var tw: TechWebScript = GameState.get_tech_web() if GameState.has_method("get_tech_web") else null
var tw: TechWebScript = TurnManager.get_tech_web() as TechWebScript
if tw == null:
return

View file

@ -53,7 +53,7 @@ func _setup_game_state() -> void:
GameState.current_player_index = 0
var tw: TechWebScript = GameState.get_tech_web()
var tw: TechWebScript = TurnManager.get_tech_web() as TechWebScript
print(
"TechWeb: %d techs, %d pillars" % [tw.get_tech_count(), tw.get_pillars().size()]
)