Avatar loader & customization system: merge onto main + fix regressions, add smoke coverage #53

Merged
agent-bot merged 27 commits from agent/896fbb97de1d into main 2026-08-21 01:35:29 +00:00
Showing only changes of commit 62f12e55db - Show all commits
+10 -3
View File
@@ -41,12 +41,14 @@ func load_catalog(path: String = _catalog_path) -> Error:
var json_text: String = file.get_as_text()
file.close()
var json: JSONParseResult = JSON.parse_string(json_text)
if json == null:
var result: Variant = JSON.parse_string(json_text)
if result == null or not result is Dictionary:
catalog_load_failed.emit("Invalid JSON in catalog: %s" % path)
return ERR_PARSE_ERROR
if not json is Dictionary or not json.has("assets"):
var json: Dictionary = result as Dictionary
if not json.has("assets"):
catalog_load_failed.emit("Catalog missing 'assets' key")
return ERR_INVALID_DATA
@@ -56,6 +58,11 @@ func load_catalog(path: String = _catalog_path) -> Error:
return OK
## Check if the catalog has been loaded.
func is_loaded() -> bool:
return _loaded
## Resolve an asset by its ID.
## Returns a Dictionary with keys: type, slot, path, version, etc.
## Returns null if the asset ID is not found.