feat: add scattered discoverable resources

This commit is contained in:
2026-07-07 15:38:31 +02:00
parent 036c9d5141
commit 72d1cfc15d
7 changed files with 66 additions and 17 deletions
+4 -4
View File
@@ -36,10 +36,10 @@ func _run() -> void:
"Runtime should not retain duplicate flat-world objects"
)
var resource_root := main_scene.get_node("JajceWorld/WorldObjects/ResourceNodes")
_check(resource_root.get_child_count() == 4, "Runtime should contain four Jajce ResourceNodes")
_check(resource_root.get_child_count() == 8, "Runtime should contain eight Jajce ResourceNodes")
_check(
simulation_manager.resource_states.size() == 4,
"Simulation authority should bind all four Jajce resources"
simulation_manager.resource_states.size() == 8,
"Simulation authority should bind all eight Jajce resources"
)
var navigation_map: RID = main_scene.get_world_3d().navigation_map
@@ -102,7 +102,7 @@ func _run() -> void:
)
if failures.is_empty():
print("[TEST] Jajce runtime passed: 6 NPCs, typed storage and activity sites")
print("[TEST] Jajce runtime passed: 6 NPCs, 8 resources, typed sites")
quit(0)
return
+13 -3
View File
@@ -113,8 +113,18 @@ func _run() -> void:
ids.append(String((resource as ResourceNode).node_id))
ids.sort()
_check(
ids == ["berry_bush_01", "berry_bush_02", "tree_01", "tree_02"],
"Jajce resources should preserve all stable IDs"
ids
== [
"animal_camp_01",
"berry_bush_01",
"berry_bush_02",
"berry_patch_river_01",
"tree_01",
"tree_02",
"tree_north_outskirts_01",
"tree_south_edge_01"
],
"Jajce resources should preserve all stable and discoverable IDs"
)
var metadata_valid := true
for resource in resources:
@@ -218,7 +228,7 @@ func _run() -> void:
if failures.is_empty():
print(
"[TEST] Jajce scaffold passed: Terrain3D, storage/activity sites, shader water"
"[TEST] Jajce scaffold passed: Terrain3D, scattered resources, typed sites"
)
quit(0)
return