feat: add paired goat care
This commit is contained in:
@@ -397,29 +397,39 @@ func _run() -> void:
|
||||
_check(outskirt_context_count >= 4, "Jajce discovery should include outskirts/river contexts")
|
||||
_check(farming_context_count >= 1, "Jajce food discovery should include farming contexts")
|
||||
var animal_root := world.get_node("WorldObjects/Animals")
|
||||
var goat := animal_root.get_node("Dunja") as AnimalNode
|
||||
var dunja := animal_root.get_node("Dunja") as AnimalNode
|
||||
var zora := animal_root.get_node("Zora") as AnimalNode
|
||||
_check(
|
||||
animal_root.get_child_count() == 1 and goat != null,
|
||||
"Jajce should contain one bounded loaded-animal presentation"
|
||||
animal_root.get_child_count() == 2 and dunja != null and zora != null,
|
||||
"Jajce should contain the bounded pair of loaded-animal presentations"
|
||||
)
|
||||
_check(
|
||||
(
|
||||
goat.animal_id == SimulationIds.ANIMAL_DUNJA
|
||||
and goat.species_id == SimulationIds.SPECIES_GOAT
|
||||
and goat.display_name == "Dunja"
|
||||
dunja.animal_id == SimulationIds.ANIMAL_DUNJA
|
||||
and dunja.species_id == SimulationIds.SPECIES_GOAT
|
||||
and dunja.display_name == "Dunja"
|
||||
and zora.animal_id == SimulationIds.ANIMAL_ZORA
|
||||
and zora.species_id == SimulationIds.SPECIES_GOAT
|
||||
and zora.display_name == "Zora"
|
||||
),
|
||||
"The authored goat should preserve its stable identity and readable name"
|
||||
"The authored goats should preserve unique stable identities and readable names"
|
||||
)
|
||||
_check(
|
||||
not goat.is_in_group("resource_nodes") and ResourceNode.get_by_id(goat.animal_id) == null,
|
||||
"The identity-backed goat should remain separate from finite resources"
|
||||
(
|
||||
not dunja.is_in_group("resource_nodes")
|
||||
and not zora.is_in_group("resource_nodes")
|
||||
and ResourceNode.get_by_id(dunja.animal_id) == null
|
||||
and ResourceNode.get_by_id(zora.animal_id) == null
|
||||
),
|
||||
"The identity-backed goats should remain separate from finite resources"
|
||||
)
|
||||
_check(
|
||||
goat.is_in_group("grass_interactors"),
|
||||
"Dunja should bend camera-local grass through the shared presentation group"
|
||||
dunja.is_in_group("grass_interactors") and zora.is_in_group("grass_interactors"),
|
||||
"Both goats should bend camera-local grass through the shared presentation group"
|
||||
)
|
||||
var habitat_root := world.get_node("WorldObjects/AnimalHabitats")
|
||||
var habitat := habitat_root.get_node("DunjaHabitat")
|
||||
var dunja_habitat := habitat_root.get_node("DunjaHabitat")
|
||||
var zora_shelter_context := habitat_root.get_node("ZoraShelter")
|
||||
var routine_sites: Array[AnimalRoutineSite] = []
|
||||
for site in AnimalRoutineSite.get_all():
|
||||
routine_sites.append(site)
|
||||
@@ -428,16 +438,25 @@ func _run() -> void:
|
||||
return String(first.site_id) < String(second.site_id)
|
||||
)
|
||||
_check(
|
||||
habitat_root.get_child_count() == 1 and habitat != null and routine_sites.size() == 2,
|
||||
"Jajce should keep Dunja's two routine anchors inside one self-contained habitat scene"
|
||||
(
|
||||
habitat_root.get_child_count() == 2
|
||||
and dunja_habitat != null
|
||||
and zora_shelter_context != null
|
||||
and routine_sites.size() == 3
|
||||
),
|
||||
"Jajce should author one shared pasture and a private shelter context for each goat"
|
||||
)
|
||||
_check(
|
||||
(
|
||||
routine_sites.size() == 2
|
||||
routine_sites.size() == 3
|
||||
and routine_sites[0].site_id == SimulationIds.ANIMAL_SITE_DUNJA_PASTURE
|
||||
and routine_sites[1].site_id == SimulationIds.ANIMAL_SITE_DUNJA_SHELTER
|
||||
and routine_sites[2].site_id == SimulationIds.ANIMAL_SITE_ZORA_SHELTER
|
||||
and routine_sites[0].resident_animal_id.is_empty()
|
||||
and routine_sites[1].resident_animal_id == SimulationIds.ANIMAL_DUNJA
|
||||
and routine_sites[2].resident_animal_id == SimulationIds.ANIMAL_ZORA
|
||||
),
|
||||
"Dunja's pasture and shelter should expose deterministic stable IDs"
|
||||
"Routine sites should expose stable IDs with shared pasture and exact shelter ownership"
|
||||
)
|
||||
_check(world.has_node("WorldObjects/StorageSites"), "JajceWorld should expose StorageSites")
|
||||
var pantry := world.get_node("WorldObjects/StorageSites/VillagePantry") as StorageNode
|
||||
@@ -491,7 +510,8 @@ func _run() -> void:
|
||||
var destinations: Array[Vector3] = []
|
||||
for resource in resources:
|
||||
destinations.append((resource as ResourceNode).interaction_point.global_position)
|
||||
destinations.append(goat.get_interaction_position())
|
||||
destinations.append(dunja.get_interaction_position())
|
||||
destinations.append(zora.get_interaction_position())
|
||||
for site in routine_sites:
|
||||
destinations.append(site.get_routine_position())
|
||||
destinations.append(pantry.get_interaction_position())
|
||||
|
||||
Reference in New Issue
Block a user