diff --git a/scripts/chunk_scene.gd b/scripts/chunk_scene.gd index ce231a4..5ac66eb 100644 --- a/scripts/chunk_scene.gd +++ b/scripts/chunk_scene.gd @@ -11,9 +11,9 @@ extends Node3D ## ## ``` ## ChunkScene (Node3D) -## ├─ TileLayer (Node3D) # one per tile layer (ground, walls, decor, ...) -## ├─ StaticObject (Node3D) # props, geometry, interactables -## └─ DynamicObject (Node3D) # spawnable entities (templates) +## ├── TileLayer (Node3D) # one per tile layer (ground, walls, decor, ...) +## ├── StaticObject (Node3D) # props, geometry, interactables +## └── DynamicObject (Node3D) # spawnable entities (templates) ## ``` ## ## ## Lifecycle @@ -164,7 +164,7 @@ func contains_position(pos: Vector3) -> bool: ## Check if a chunk coordinate is adjacent to this chunk. func is_adjacent(other_coord: Vector3i) -> bool: - var dx := abs(coord.x - other_coord.x) - var dy := abs(coord.y - other_coord.y) - var dz := abs(coord.z - other_coord.z) + var dx: int = abs(coord.x - other_coord.x) + var dy: int = abs(coord.y - other_coord.y) + var dz: int = abs(coord.z - other_coord.z) return dx <= 1 and dy <= 1 and dz <= 1 and (dx + dy + dz) > 0