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 1be947f9ef - Show all commits
+29 -8
View File
@@ -27,6 +27,27 @@ var validation_errors: Array[String] = []
var skin_tone: Color = Color.TRANSPARENT
# ---------------------------------------------------------------------------
# Inner class: SlotItem
# ---------------------------------------------------------------------------
## Represents a single equipped slot item in a loadout.
## Used by AvatarVisualizer to access slot data.
class SlotItem:
## The asset ID of the equipped item.
var asset_id: String = ""
## The slot key this item belongs to.
var slot_key: String = ""
func _init(p_asset_id: String = "", p_slot_key: String = "") -> void:
asset_id = p_asset_id
slot_key = p_slot_key
# ---------------------------------------------------------------------------
# Lifecycle
# ---------------------------------------------------------------------------
func _init() -> void:
validation_errors = []
@@ -132,14 +153,14 @@ func validate() -> bool:
slot_id, typeof(value)
]
)
elif value is Array:
if slot_id == "accessory":
if value.size() > MAX_ACCESSORIES:
validation_errors.append(
"Accessory count (%d) exceeds maximum (%d)" % [
value.size(), MAX_ACCESSORIES
]
)
elif value is Array:
if slot_id == "accessory":
if value.size() > MAX_ACCESSORIES:
validation_errors.append(
"Accessory count (%d) exceeds maximum (%d)" % [
value.size(), MAX_ACCESSORIES
]
)
# Check for duplicate accessories
if slots.has("accessory") and slots["accessory"] is Array: