From c44befb57741537269063f4b8ba8dacbb70cd82d Mon Sep 17 00:00:00 2001 From: Natalie Date: Mon, 11 May 2026 20:02:22 -0700 Subject: [PATCH] =?UTF-8?q?fix(@projects/@magic-civilization):=20?= =?UTF-8?q?=F0=9F=90=9B=20skip=20schema=20files=20in=20unit=20catalog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- src/game/engine/scenes/headless/claude_player_main.gd | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/game/engine/scenes/headless/claude_player_main.gd b/src/game/engine/scenes/headless/claude_player_main.gd index c013b34b..d7a9482c 100644 --- a/src/game/engine/scenes/headless/claude_player_main.gd +++ b/src/game/engine/scenes/headless/claude_player_main.gd @@ -192,7 +192,16 @@ func _apply_runtime_units_catalog(gs: RefCounted) -> void: dir.list_dir_begin() var fname: String = dir.get_next() while fname != "": - if not dir.current_is_dir() and fname.ends_with(".json"): + # Skip `*.schema.json` — those are JSON Schema descriptors that + # live alongside the unit data files but describe the shape, not + # instances of it. Including them would feed the deserializer + # `{"$schema": "...", "type": "object", "properties": {...}}` + # without an `id` field, which correctly rejects. + if ( + not dir.current_is_dir() + and fname.ends_with(".json") + and not fname.ends_with(".schema.json") + ): var path: String = UNITS_DIR + "/" + fname var f: FileAccess = FileAccess.open(path, FileAccess.READ) if f != null: