feat: replace activity markers with typed sites
This commit is contained in:
@@ -127,6 +127,19 @@ func _run() -> void:
|
||||
not world.has_node("LegacyActivityMarkers/PantryMarker"),
|
||||
"Pantry should no longer be a legacy activity marker"
|
||||
)
|
||||
_check(
|
||||
not world.has_node("LegacyActivityMarkers"),
|
||||
"JajceWorld should no longer expose legacy activity markers"
|
||||
)
|
||||
var activity_root := world.get_node("WorldObjects/ActivitySites")
|
||||
var activity_ids: Array[String] = []
|
||||
for site in activity_root.get_children():
|
||||
activity_ids.append(String((site as ActivitySite).site_id))
|
||||
activity_ids.sort()
|
||||
_check(
|
||||
activity_ids == ["guard_post", "rest_bench", "study_desk"],
|
||||
"Jajce activity sites should preserve stable semantic IDs"
|
||||
)
|
||||
|
||||
var navigation_region := world.get_node("NavigationRegion3D") as NavigationRegion3D
|
||||
var navigation_map: RID = NavigationServer3D.region_get_map(navigation_region.get_rid())
|
||||
@@ -143,8 +156,8 @@ func _run() -> void:
|
||||
for resource in resources:
|
||||
destinations.append((resource as ResourceNode).interaction_point.global_position)
|
||||
destinations.append(pantry.get_interaction_position())
|
||||
for marker in world.get_node("LegacyActivityMarkers").get_children():
|
||||
destinations.append((marker as Marker3D).global_position)
|
||||
for site in activity_root.get_children():
|
||||
destinations.append((site as ActivitySite).get_interaction_position())
|
||||
|
||||
for origin in origins:
|
||||
for destination in destinations:
|
||||
@@ -187,10 +200,15 @@ func _run() -> void:
|
||||
storage_target_position.distance_to(pantry.get_interaction_position()) < 0.01,
|
||||
"Storage actions should use the pantry StorageNode interaction point"
|
||||
)
|
||||
var rest_target := adapter.get_activity_target(SimulationIds.ACTION_REST)
|
||||
_check(
|
||||
rest_target.get("target_id", "") == "rest_bench",
|
||||
"Rest should target the typed RestBench ActivitySite"
|
||||
)
|
||||
|
||||
if failures.is_empty():
|
||||
print(
|
||||
"[TEST] Jajce scaffold passed: Terrain3D, storage site, shader water, building blockouts"
|
||||
"[TEST] Jajce scaffold passed: Terrain3D, storage/activity sites, shader water"
|
||||
)
|
||||
quit(0)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user