feat: author resource-aware riverbank grove

This commit is contained in:
Rijad Zuzo
2026-07-17 13:57:57 +02:00
parent 145b90eb97
commit 04c5371b6b
23 changed files with 823 additions and 63 deletions
+11 -1
View File
@@ -324,7 +324,7 @@ func _run() -> void:
_check(lookdev.has_node("BeautyCamera"), "Lookdev should provide a beauty camera")
lookdev.free()
var resources := world.get_node("WorldObjects/ResourceNodes").get_children()
var resources := _collect_resource_nodes(world.get_node("WorldObjects"))
var ids: Array[String] = []
for resource in resources:
ids.append(String((resource as ResourceNode).node_id))
@@ -561,6 +561,16 @@ func _check(condition: bool, message: String) -> void:
failures.append(message)
func _collect_resource_nodes(parent: Node) -> Array[ResourceNode]:
var resources: Array[ResourceNode] = []
for child in parent.get_children():
if child is ResourceNode:
resources.append(child)
else:
resources.append_array(_collect_resource_nodes(child))
return resources
func _check_path_tracks_terrain(
terrain: Terrain3D, path: PackedVector3Array, message: String
) -> void: