fix(client): resolve GDScript autoload parse-order errors

Autoload scripts are parsed before regular scripts, so class_name
types (CharacterVisualDescriptor, TestHarness, YamlParser) are not
available at parse time. Replace type annotations with untyped vars
and use load() for in-body class references. Fixes all 14 headless
parse errors (9 pre-existing + 5 from Sprint 30 changes).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-04 23:40:28 +02:00
co-authored by Claude Opus 4.6
parent c758bcd5d6
commit 0d5323f66c
5 changed files with 11 additions and 8 deletions
+2 -2
View File
@@ -516,8 +516,8 @@ static func encode_startup_message(world_seed: int, character_archetype: String
"world_seed": world_seed,
"character_archetype": archetype_variant,
}
if character_visual != null and character_visual is CharacterVisualDescriptor:
msg["character_visual_descriptor"] = (character_visual as CharacterVisualDescriptor).to_dict()
if character_visual != null and character_visual.has_method("to_dict"):
msg["character_visual_descriptor"] = character_visual.to_dict()
var result = Messagepack.encode(msg)
if result.status != null:
push_error("Protocol: startup message encode failed: %s" % result.status)