extends Node2D ## Bootstrap. Mounts the world view + UI overlay. ## ## Once we add menus / continue-game / new-game flows this will branch ## on game state. For Phase 1 it just instances the World and TopBar, ## which are children placed in main.tscn. ## ## Phase 15 — StorytellerBanner and StorytellerModal are runtime-instantiated ## here (same pattern as world.gd's BeautySystem / DirtinessSystem). Both are ## CanvasLayer nodes so they draw above the world regardless of scene-tree order. const STORYTELLER_BANNER_SCRIPT: Script = preload("res://scenes/ui/storyteller_banner.gd") const STORYTELLER_MODAL_SCRIPT: Script = preload("res://scenes/ui/storyteller_modal.gd") func _ready() -> void: Audit.log("main", "Phase 3 — world + AI (Decision + JobRunner + RestProvider) online.") # Autoloads — keep these asserts; cheap and catch a renamed-autoload # regression instantly. assert(World != null, "World autoload missing") assert(Sim != null, "Sim autoload missing") assert(GameState != null, "GameState autoload missing") assert(EventBus != null, "EventBus autoload missing") assert(Strings != null, "Strings autoload missing") assert(SaveSystem != null, "SaveSystem autoload missing") # Phase 15 — Storyteller UI layers. Runtime-instantiated so no .tscn edit is # needed. CanvasLayer ensures correct draw order above World/TopBar regardless # of parent-node position. var banner := CanvasLayer.new() banner.set_script(STORYTELLER_BANNER_SCRIPT) banner.name = "StorytellerBanner" add_child(banner) var modal := CanvasLayer.new() modal.set_script(STORYTELLER_MODAL_SCRIPT) modal.name = "StorytellerModal" add_child(modal) Audit.log("main", "Phase 15 — StorytellerBanner + StorytellerModal mounted.")