feat: add typed pantry storage site
This commit is contained in:
@@ -47,8 +47,17 @@ func _run() -> void:
|
||||
|
||||
var fixed_origins := [Vector3(-6.0, 0.0, -4.0), Vector3(0.0, 0.0, 0.0), Vector3(6.0, 0.0, 4.0)]
|
||||
var destinations: Array[Vector3] = []
|
||||
_check(
|
||||
main_scene.has_node("JajceWorld/WorldObjects/StorageSites/VillagePantry"),
|
||||
"Runtime should expose a typed VillagePantry StorageNode"
|
||||
)
|
||||
_check(
|
||||
not main_scene.has_node("JajceWorld/LegacyActivityMarkers/PantryMarker"),
|
||||
"Runtime should not keep the pantry as a legacy activity marker"
|
||||
)
|
||||
var pantry := main_scene.get_node("JajceWorld/WorldObjects/StorageSites/VillagePantry") as StorageNode
|
||||
destinations.append(pantry.get_interaction_position())
|
||||
for marker_path in [
|
||||
"JajceWorld/LegacyActivityMarkers/PantryMarker",
|
||||
"JajceWorld/LegacyActivityMarkers/GuardZone",
|
||||
"JajceWorld/LegacyActivityMarkers/StudyZone",
|
||||
"JajceWorld/LegacyActivityMarkers/RestZone"
|
||||
@@ -81,8 +90,15 @@ func _run() -> void:
|
||||
executor.advance_npc(starving, village)
|
||||
_check(starving.is_dead, "Starvation threshold should still kill an NPC")
|
||||
|
||||
var adapter := main_scene.get_node("ActiveWorldAdapter") as ActiveWorldAdapter
|
||||
var storage_target := adapter.get_activity_target(SimulationIds.ACTION_DEPOSIT_FOOD)
|
||||
_check(
|
||||
storage_target.get("target_id", "") == String(SimulationIds.STORAGE_VILLAGE_PANTRY),
|
||||
"Runtime adapter should route storage actions to village_pantry"
|
||||
)
|
||||
|
||||
if failures.is_empty():
|
||||
print("[TEST] Jajce runtime passed: 6 NPCs, 4 resources, 24 navigation routes")
|
||||
print("[TEST] Jajce runtime passed: 6 NPCs, 4 resources, typed pantry route")
|
||||
quit(0)
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user