diff --git a/client/scripts/main.gd b/client/scripts/main.gd index 879aa6723..31f803d95 100644 --- a/client/scripts/main.gd +++ b/client/scripts/main.gd @@ -1,7 +1,9 @@ extends Node2D @onready var world_renderer = $World +@onready var camera = $Camera2D @onready var hud = $UILayer/HUD +@onready var monologue_display = $UILayer/MonologueDisplay func _ready() -> void: print("The Settled Reach — client initialized") @@ -19,12 +21,19 @@ func _process(_delta: float) -> void: if world_renderer and world_renderer.has_method("update_from_state"): world_renderer.update_from_state() + # Track camera to player position (D-015) + camera.position = GameState.player_position * 32 # tile-space to pixel-space + # Update HUD if hud and hud.has_method("update_from_hud_data"): hud.update_from_hud_data(GameState.hud_data) if snapshot.has("player") and snapshot.player.has("health"): hud.update_health(snapshot.player.health) + # Wire monologue display (D-016 perception data path) + if snapshot.has("monologue") and monologue_display: + monologue_display.show_monologue(snapshot.monologue) + # Send queued input to simulation var inputs = InputMapper.flush_queue() for input in inputs: diff --git a/client/ui/minimap.tscn b/client/ui/minimap.tscn index 17c52b2df..9ce330777 100644 --- a/client/ui/minimap.tscn +++ b/client/ui/minimap.tscn @@ -21,12 +21,14 @@ anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -[node name="Background" type="ColorRect" parent="SubViewportContainer"] +[node name="SubViewport" type="SubViewport" parent="SubViewportContainer"] +size = Vector2i(200, 200) +render_target_update_mode = 4 + +[node name="Background" type="ColorRect" parent="SubViewportContainer/SubViewport"] anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 -offset_right = 200.0 -offset_bottom = 200.0 grow_horizontal = 2 grow_vertical = 2 color = Color(0.1, 0.1, 0.1, 0.7)