more lint and formatting
Some checks failed
Continuous Integration / Code Formatting (push) Successful in 33s
Continuous Integration / Code Quality Check (push) Successful in 29s
Continuous Integration / Test Execution (push) Failing after 16s
Continuous Integration / CI Summary (push) Failing after 4s

This commit is contained in:
2025-10-01 15:04:40 +04:00
parent 538459f323
commit 3b8da89ad5
31 changed files with 2112 additions and 691 deletions

View File

@@ -123,7 +123,9 @@ func remove_gem_type(gem_index: int) -> bool:
return false
if active_gem_types.size() <= 2: # Keep at least 2 gem types
DebugManager.log_warn("Cannot remove gem type - minimum 2 types required", "Tile")
DebugManager.log_warn(
"Cannot remove gem type - minimum 2 types required", "Tile"
)
return false
active_gem_types.erase(gem_index)
@@ -178,7 +180,12 @@ func _update_visual_feedback() -> void:
DebugManager.log_debug(
(
"SELECTING tile (%d,%d): target scale %.2fx, current scale %s"
% [grid_position.x, grid_position.y, scale_multiplier, sprite.scale]
% [
grid_position.x,
grid_position.y,
scale_multiplier,
sprite.scale
]
),
"Match3"
)
@@ -186,12 +193,20 @@ func _update_visual_feedback() -> void:
# Highlighted: subtle glow and larger than original board size
target_modulate = Color(1.1, 1.1, 1.1, 1.0)
scale_multiplier = UIConstants.TILE_HIGHLIGHTED_SCALE
DebugManager.log_debug(
(
"HIGHLIGHTING tile (%d,%d): target scale %.2fx, current scale %s"
% [grid_position.x, grid_position.y, scale_multiplier, sprite.scale]
),
"Match3"
(
DebugManager
. log_debug(
(
"HIGHLIGHTING tile (%d,%d): target scale %.2fx, current scale %s"
% [
grid_position.x,
grid_position.y,
scale_multiplier,
sprite.scale
]
),
"Match3"
)
)
else:
# Normal state: white and original board size
@@ -200,7 +215,12 @@ func _update_visual_feedback() -> void:
DebugManager.log_debug(
(
"NORMALIZING tile (%d,%d): target scale %.2fx, current scale %s"
% [grid_position.x, grid_position.y, scale_multiplier, sprite.scale]
% [
grid_position.x,
grid_position.y,
scale_multiplier,
sprite.scale
]
),
"Match3"
)
@@ -228,7 +248,11 @@ func _update_visual_feedback() -> void:
tween.tween_callback(_on_scale_animation_completed.bind(target_scale))
else:
DebugManager.log_debug(
"No scale change needed for tile (%d,%d)" % [grid_position.x, grid_position.y], "Match3"
(
"No scale change needed for tile (%d,%d)"
% [grid_position.x, grid_position.y]
),
"Match3"
)
@@ -264,7 +288,9 @@ func _input(event: InputEvent) -> void:
if event.button_index == MOUSE_BUTTON_LEFT and event.pressed:
# Check if the mouse click is within the tile's bounds
var local_position = to_local(get_global_mouse_position())
var sprite_rect = Rect2(-TILE_SIZE / 2.0, -TILE_SIZE / 2.0, TILE_SIZE, TILE_SIZE)
var sprite_rect = Rect2(
-TILE_SIZE / 2.0, -TILE_SIZE / 2.0, TILE_SIZE, TILE_SIZE
)
if sprite_rect.has_point(local_position):
tile_selected.emit(self)