feat: route resources through typed content
This commit is contained in:
@@ -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"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user