feat: integrate regional caravan persistence
This commit is contained in:
@@ -47,8 +47,11 @@ func _test_core_pack() -> void:
|
||||
"Core professions should enumerate by stable ID"
|
||||
)
|
||||
_check(
|
||||
_item_ids(catalog.get_items()) == [&"food", &"herb", &"item_claw", &"item_sword", &"wood"],
|
||||
"Core items should include legacy items and herbs in stable-ID order"
|
||||
(
|
||||
_item_ids(catalog.get_items())
|
||||
== [&"food", &"herb", &"item_claw", &"item_sword", &"regional_trade_goods", &"wood"]
|
||||
),
|
||||
"Core items should include local and regional resources in stable-ID order"
|
||||
)
|
||||
_check(
|
||||
_enemy_ids(catalog.get_enemies()) == [&"enemy_boar", &"enemy_raider", &"enemy_wolf"],
|
||||
@@ -102,14 +105,22 @@ func _test_deterministic_enumeration_and_dependencies() -> void:
|
||||
_check(
|
||||
(
|
||||
_item_ids(catalog.get_items())
|
||||
== [&"amber", &"food", &"herb", &"item_claw", &"item_sword", &"wood"]
|
||||
== [
|
||||
&"amber",
|
||||
&"food",
|
||||
&"herb",
|
||||
&"item_claw",
|
||||
&"item_sword",
|
||||
&"regional_trade_goods",
|
||||
&"wood",
|
||||
]
|
||||
),
|
||||
"Merged item enumeration should be globally stable-ID sorted"
|
||||
)
|
||||
var returned_items := catalog.get_items()
|
||||
returned_items.clear()
|
||||
_check(
|
||||
catalog.get_items().size() == 6,
|
||||
catalog.get_items().size() == 7,
|
||||
"Callers should not be able to mutate the catalog's ordered arrays"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user