From 70490781f35ce8aaf644fe79a44a1848155fd6b9 Mon Sep 17 00:00:00 2001 From: Natalie Date: Sun, 10 May 2026 03:54:39 -0700 Subject: [PATCH] =?UTF-8?q?feat(@projects/@magic-civilization):=20?= =?UTF-8?q?=E2=9C=A8=20add=20test=20fix=20for=20worldmap=20rendering?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- .../scenes/tests/iter_7q_worldmap_visual_proof.gd | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/game/engine/scenes/tests/iter_7q_worldmap_visual_proof.gd b/src/game/engine/scenes/tests/iter_7q_worldmap_visual_proof.gd index e80111e5..b85da808 100644 --- a/src/game/engine/scenes/tests/iter_7q_worldmap_visual_proof.gd +++ b/src/game/engine/scenes/tests/iter_7q_worldmap_visual_proof.gd @@ -40,6 +40,18 @@ func _ready() -> void: var world_map: Node = WorldMapScene.instantiate() add_child(world_map) + # WorldMap itself is a Node2D, but its ViewportWindowManager child is a + # Control that anchors full-rect to its parent. Without an explicit size + # the Control resolves to 0×0 (Node2D parent), the SubViewportContainer + # stretch can't inflate, and the composited frame renders black. Push the + # 1920×1080 size manually after mount so all descendants size correctly. + var vwm: Control = world_map.get_node_or_null("ViewportWindowManager") as Control + if vwm != null: + vwm.size = Vector2(1920, 1080) + # Re-trigger the size-resolved code path that wires the SubViewport. + if vwm.has_method("_sync_background_size"): + vwm.call("_sync_background_size") + # Wait for rendering to settle for _i: int in range(30): await get_tree().process_frame