feat: replace activity markers with typed sites

This commit is contained in:
2026-07-07 13:27:02 +02:00
parent e5bd93d705
commit 4c090f1635
19 changed files with 308 additions and 126 deletions
+11 -7
View File
@@ -31,6 +31,7 @@ func _run() -> void:
not main_scene.has_node("World")
and not main_scene.has_node("ResourceNodes")
and not main_scene.has_node("ActivityMarkers")
and not main_scene.has_node("JajceWorld/LegacyActivityMarkers")
),
"Runtime should not retain duplicate flat-world objects"
)
@@ -57,12 +58,10 @@ func _run() -> void:
)
var pantry := main_scene.get_node("JajceWorld/WorldObjects/StorageSites/VillagePantry") as StorageNode
destinations.append(pantry.get_interaction_position())
for marker_path in [
"JajceWorld/LegacyActivityMarkers/GuardZone",
"JajceWorld/LegacyActivityMarkers/StudyZone",
"JajceWorld/LegacyActivityMarkers/RestZone"
]:
destinations.append(main_scene.get_node(marker_path).global_position)
var activity_root := main_scene.get_node("JajceWorld/WorldObjects/ActivitySites")
_check(activity_root.get_child_count() == 3, "Runtime should expose three typed activity sites")
for site in activity_root.get_children():
destinations.append((site as ActivitySite).get_interaction_position())
for resource in resource_root.get_children():
destinations.append((resource as ResourceNode).interaction_point.global_position)
@@ -96,9 +95,14 @@ func _run() -> void:
storage_target.get("target_id", "") == String(SimulationIds.STORAGE_VILLAGE_PANTRY),
"Runtime adapter should route storage actions to village_pantry"
)
var study_target := adapter.get_activity_target(SimulationIds.ACTION_STUDY)
_check(
study_target.get("target_id", "") == "study_desk",
"Runtime adapter should route study to the typed study desk"
)
if failures.is_empty():
print("[TEST] Jajce runtime passed: 6 NPCs, 4 resources, typed pantry route")
print("[TEST] Jajce runtime passed: 6 NPCs, typed storage and activity sites")
quit(0)
return