feat: score resource discovery by comfort and safety
This commit is contained in:
@@ -116,6 +116,16 @@ func _run() -> void:
|
||||
ids == ["berry_bush_01", "berry_bush_02", "tree_01", "tree_02"],
|
||||
"Jajce resources should preserve all stable IDs"
|
||||
)
|
||||
var metadata_valid := true
|
||||
for resource in resources:
|
||||
var node := resource as ResourceNode
|
||||
metadata_valid = (
|
||||
metadata_valid
|
||||
and node.comfort_distance > 0.0
|
||||
and node.safety_risk >= 0.0
|
||||
and node.safety_risk <= 1.0
|
||||
)
|
||||
_check(metadata_valid, "Jajce resources should define discovery metadata")
|
||||
_check(world.has_node("WorldObjects/StorageSites"), "JajceWorld should expose StorageSites")
|
||||
var pantry := world.get_node("WorldObjects/StorageSites/VillagePantry") as StorageNode
|
||||
_check(pantry != null, "JajceWorld should include a typed VillagePantry StorageNode")
|
||||
|
||||
Reference in New Issue
Block a user