From 57a67ecb0bfe2af9d125a5b6a848628bed2a6351 Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Wed, 11 Feb 2026 18:24:13 +0100 Subject: [PATCH] =?UTF-8?q?fix(client):=20address=20PR=20review=20round=20?= =?UTF-8?q?2=20=E2=80=94=20camera=20tracking,=20minimap,=20monologue=20wir?= =?UTF-8?q?ing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Camera2D now tracks player_position from GameState (D-015) - Add SubViewport child to minimap SubViewportContainer (fixes editor warning) - Wire MonologueDisplay into main loop for D-016 perception data path Co-Authored-By: Claude Opus 4.6 --- client/scripts/main.gd | 9 +++++++++ client/ui/minimap.tscn | 8 +++++--- 2 files changed, 14 insertions(+), 3 deletions(-) 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)