From 594a0ce84df4afc57f924a65a769c82f0b2ed4f9 Mon Sep 17 00:00:00 2001 From: adtpdn Date: Wed, 1 Jul 2026 11:28:07 +0800 Subject: [PATCH] Fix gauntlet_manager indentation and scope --- scripts/managers/gauntlet_manager.gd | 60 ++++++++++++++-------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/scripts/managers/gauntlet_manager.gd b/scripts/managers/gauntlet_manager.gd index 2a5614f..0878f77 100644 --- a/scripts/managers/gauntlet_manager.gd +++ b/scripts/managers/gauntlet_manager.gd @@ -503,39 +503,39 @@ func _spawn_mission_tiles() -> void: # Goal items: Heart(7), Diamond(8), Star(9), Coin(10) var goal_items = [7, 8, 9, 10] var tiles_spawned: int = 0 + var main = get_node_or_null("/root/Main") - for x in range(ARENA_COLUMNS): - for z in range(ARENA_ROWS): - var pos = Vector2i(x, z) - - # Skip NPC pump zone (center 3x3) - if x >= 8 and x <= 10 and z >= 8 and z <= 10: - continue - - # Check base floor — don't spawn on void (or walls if they were still obstacles) - var base_tile = gridmap.get_cell_item(Vector3i(x, 0, z)) - if base_tile == -1: - continue - - # Ensure we don't spawn powerups on the perimeter walls even though they look like floors - if x == 0 or x == ARENA_COLUMNS - 1 or z == 0 or z == ARENA_ROWS - 1: - continue - - # Skip if something already exists on Layer 1 - var current_item = gridmap.get_cell_item(Vector3i(x, 1, z)) - if current_item != -1: - continue - - # Spawn tiles with 60% density (40% chance to skip) - if randf() > 0.6: - continue - - var tile_type = goal_items[randi() % goal_items.size()] - gridmap.set_cell_item(Vector3i(x, 1, z), tile_type) - tiles_spawned += 1 + for x in range(ARENA_COLUMNS): + for z in range(ARENA_ROWS): + var pos = Vector2i(x, z) + + # Skip NPC pump zone (center 3x3) + if x >= 8 and x <= 10 and z >= 8 and z <= 10: + continue + + # Check base floor — don't spawn on void (or walls if they were still obstacles) + var base_tile = gridmap.get_cell_item(Vector3i(x, 0, z)) + if base_tile == -1: + continue + + # Ensure we don't spawn powerups on the perimeter walls even though they look like floors + if x == 0 or x == ARENA_COLUMNS - 1 or z == 0 or z == ARENA_ROWS - 1: + continue + + # Skip if something already exists on Layer 1 + var current_item = gridmap.get_cell_item(Vector3i(x, 1, z)) + if current_item != -1: + continue + + # Spawn tiles with 60% density (40% chance to skip) + if randf() > 0.6: + continue + + var tile_type = goal_items[randi() % goal_items.size()] + gridmap.set_cell_item(Vector3i(x, 1, z), tile_type) + tiles_spawned += 1 # Sync to clients - var main = get_node("/root/Main") if main: main.rpc("sync_grid_item", x, 1, z, tile_type)