From 55bb8d987a4e35e4a64e02236715c615e7b7237f Mon Sep 17 00:00:00 2001 From: VinPropane Date: Fri, 29 May 2026 21:09:25 -0400 Subject: [PATCH] NEO-97: fix duplicate npc_row parse error in runtime client GDScript cannot define instance and static npc_row with the same name; helpers and tests now call npc_row_in_snapshot for static lookup. --- client/scripts/npc_combat_hud_helpers.gd | 2 +- client/scripts/npc_runtime_client.gd | 4 ---- client/test/npc_runtime_client_test.gd | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/client/scripts/npc_combat_hud_helpers.gd b/client/scripts/npc_combat_hud_helpers.gd index 1d66ebb..c7d22da 100644 --- a/client/scripts/npc_combat_hud_helpers.gd +++ b/client/scripts/npc_combat_hud_helpers.gd @@ -38,7 +38,7 @@ static func resolve_hud_npc_rows( var lock_id := locked_target_id_from_state(last_target_state) var locked_row: Dictionary = {} if is_known_npc_id(lock_id): - locked_row = NpcRuntimeClient.npc_row(lock_id, npc_runtime_snapshot) + locked_row = NpcRuntimeClient.npc_row_in_snapshot(lock_id, npc_runtime_snapshot) var incoming_row: Dictionary = {} var aggro_row: Dictionary = incoming_aggro_row(dev_player_id, npc_runtime_snapshot) if not aggro_row.is_empty(): diff --git a/client/scripts/npc_runtime_client.gd b/client/scripts/npc_runtime_client.gd index b4dbd89..cb361d2 100644 --- a/client/scripts/npc_runtime_client.gd +++ b/client/scripts/npc_runtime_client.gd @@ -60,10 +60,6 @@ func npc_row(instance_id: String, snapshot: Dictionary = {}) -> Dictionary: return npc_row_in_snapshot(instance_id, source) -static func npc_row(instance_id: String, snapshot: Dictionary = {}) -> Dictionary: - return npc_row_in_snapshot(instance_id, snapshot) - - static func npc_row_in_snapshot(instance_id: String, snapshot: Dictionary) -> Dictionary: var source: Dictionary = snapshot if source.is_empty(): diff --git a/client/test/npc_runtime_client_test.gd b/client/test/npc_runtime_client_test.gd index 37149f6..b8b9c81 100644 --- a/client/test/npc_runtime_client_test.gd +++ b/client/test/npc_runtime_client_test.gd @@ -83,7 +83,7 @@ func test_npc_row_returns_elite_telegraph_fields() -> void: # Arrange var parsed: Variant = NpcRuntimeClient.parse_runtime_json(_runtime_snapshot_json()) # Act - var row: Dictionary = NpcRuntimeClient.npc_row( + var row: Dictionary = NpcRuntimeClient.npc_row_in_snapshot( "prototype_npc_elite", parsed as Dictionary ) # Assert