Eight windows per room and random zombie entry from different windows

This commit is contained in:
enne2
2026-10-13 21:21:17 +02:00
parent 70c82df450
commit fcf298c692
9 changed files with 400 additions and 70 deletions
+5 -2
View File
@@ -8,7 +8,10 @@ func run_test() -> void:
var world = load("res://scenes/main.tscn").instantiate()
root.add_child(world)
var surfaces = get_nodes_in_group("office_surfaces")
assert(surfaces.size() == 17) # sixteen wall segments + ceiling
# Muri: per ogni muro (aperture+1) pezzi pieni, piu' davanzale e architrave per
# ogni apertura; poi il soffitto. Il numero si ricava dalle costanti della stanza.
var per_wall: int = (RoomScript.WINDOWS_PER_WALL + 1) + 2 * RoomScript.WINDOWS_PER_WALL
assert(surfaces.size() == 4 * per_wall + 1) # quattro muri + soffitto
for surface in surfaces:
assert(surface.mesh is ArrayMesh)
var mat = surface.mesh.surface_get_material(0)
@@ -16,7 +19,7 @@ func run_test() -> void:
assert(mat.albedo_texture.resource_path.contains("/office/"))
var arrays = surface.mesh.surface_get_arrays(0)
assert(arrays[Mesh.ARRAY_TEX_UV].size() == arrays[Mesh.ARRAY_VERTEX].size())
print("PASS: 17 superfici con UV esplicite e texture office originali")
print("PASS: %d superfici con UV esplicite e texture office originali (%d per muro)" % [surfaces.size(), per_wall])
var north := Vector3(0, 2.5, -9.15)
var low := Vector3(0, 0.75, -9.15)
var high := Vector3(0, 4.25, -9.15)