feat: Introduce EnhancedGridMap addon for advanced grid management and procedural generation, and StaticTektonManager for tekton spawning and placement.
This commit is contained in:
@@ -16,6 +16,7 @@ signal grid_updated
|
||||
@export var hover_item: int = 1
|
||||
@export var start_item: int = 2
|
||||
@export var end_item: int = 3
|
||||
@export var immutable_items: Array[int] = [4] # Items that cannot be randomized/reset
|
||||
|
||||
var current_mesh_library: MeshLibrary
|
||||
var grid_data: Array = [] # 3D array [floor][row][column]
|
||||
@@ -270,6 +271,11 @@ func randomize_floor(floor_index: int, custom_rng_callable: Callable = Callable(
|
||||
|
||||
for x in range(columns):
|
||||
for z in range(rows):
|
||||
# Check if current item on this floor is immutable
|
||||
var current_item_on_floor = get_cell_item(Vector3i(x, floor_index, z))
|
||||
if current_item_on_floor in immutable_items:
|
||||
continue
|
||||
|
||||
# IMPORTANT: Only place items if Floor 0 has a walkable tile
|
||||
var floor_0_item = get_cell_item(Vector3i(x, 0, z))
|
||||
var is_ground = (floor_0_item == normal_items[0]) # Assuming 0 is ground
|
||||
|
||||
Reference in New Issue
Block a user