🎨 Auto-format GDScript code

Automated formatting applied by tools/run_development.py

🤖 Generated by Gitea Actions
Workflow: Continuous Integration
Run: http://server:3000/nett00n/skelly/actions/runs/90
This commit is contained in:
Gitea Actions
2025-10-01 11:05:19 +00:00
parent 3b8da89ad5
commit 1f1c394587
28 changed files with 655 additions and 1945 deletions

View File

@@ -25,12 +25,7 @@ static func is_valid_grid_position(pos: Vector2i, grid_size: Vector2i) -> bool:
##
## Returns:
## bool: True if position is valid, False if out of bounds
return (
pos.x >= 0
and pos.y >= 0
and pos.x < grid_size.x
and pos.y < grid_size.y
)
return pos.x >= 0 and pos.y >= 0 and pos.x < grid_size.x and pos.y < grid_size.y
static func validate_grid_integrity(grid: Array, grid_size: Vector2i) -> bool:
@@ -51,8 +46,7 @@ static func validate_grid_integrity(grid: Array, grid_size: Vector2i) -> bool:
if grid.size() != grid_size.y:
DebugManager.log_error(
"Grid height mismatch: %d vs %d" % [grid.size(), grid_size.y],
"Match3"
"Grid height mismatch: %d vs %d" % [grid.size(), grid_size.y], "Match3"
)
return false
@@ -63,28 +57,20 @@ static func validate_grid_integrity(grid: Array, grid_size: Vector2i) -> bool:
if grid[y].size() != grid_size.x:
DebugManager.log_error(
(
"Grid row %d width mismatch: %d vs %d"
% [y, grid[y].size(), grid_size.x]
),
"Match3"
"Grid row %d width mismatch: %d vs %d" % [y, grid[y].size(), grid_size.x], "Match3"
)
return false
return true
static func safe_grid_access(
grid: Array, pos: Vector2i, grid_size: Vector2i
) -> Node2D:
static func safe_grid_access(grid: Array, pos: Vector2i, grid_size: Vector2i) -> Node2D:
# Safe grid access with comprehensive bounds checking
if not is_valid_grid_position(pos, grid_size):
return null
if pos.y >= grid.size() or pos.x >= grid[pos.y].size():
DebugManager.log_warn(
"Grid bounds exceeded: (%d,%d)" % [pos.x, pos.y], "Match3"
)
DebugManager.log_warn("Grid bounds exceeded: (%d,%d)" % [pos.x, pos.y], "Match3")
return null
var tile = grid[pos.y][pos.x]