feat: route resources through typed content

This commit is contained in:
Rijad Zuzo
2026-08-12 20:51:01 +02:00
parent 4e4ae1a969
commit dc0f59fcf0
31 changed files with 1071 additions and 10 deletions
+7 -4
View File
@@ -47,8 +47,8 @@ func _test_core_pack() -> void:
"Core professions should enumerate by stable ID"
)
_check(
_item_ids(catalog.get_items()) == [&"food", &"item_claw", &"item_sword", &"wood"],
"Core items should include food, wood, sword, and claw in stable-ID order"
_item_ids(catalog.get_items()) == [&"food", &"herb", &"item_claw", &"item_sword", &"wood"],
"Core items should include legacy items and herbs in stable-ID order"
)
_check(
_enemy_ids(catalog.get_enemies()) == [&"enemy_boar", &"enemy_raider", &"enemy_wolf"],
@@ -96,13 +96,16 @@ func _test_deterministic_enumeration_and_dependencies() -> void:
"Pack enumeration should not depend on input order"
)
_check(
_item_ids(catalog.get_items()) == [&"amber", &"food", &"item_claw", &"item_sword", &"wood"],
(
_item_ids(catalog.get_items())
== [&"amber", &"food", &"herb", &"item_claw", &"item_sword", &"wood"]
),
"Merged item enumeration should be globally stable-ID sorted"
)
var returned_items := catalog.get_items()
returned_items.clear()
_check(
catalog.get_items().size() == 5,
catalog.get_items().size() == 6,
"Callers should not be able to mutate the catalog's ordered arrays"
)