Fix more PascalCase inconsistencies
This commit is contained in:
@@ -110,9 +110,9 @@ Guidance for Claude Code (claude.ai/code) when working with this repository.
|
|||||||
- `src/autoloads/SaveManager.gd` - **Save system with security features**
|
- `src/autoloads/SaveManager.gd` - **Save system with security features**
|
||||||
- `src/autoloads/SettingsManager.gd` - Settings management with input validation and security
|
- `src/autoloads/SettingsManager.gd` - Settings management with input validation and security
|
||||||
- `src/autoloads/DebugManager.gd` - Debug system integration
|
- `src/autoloads/DebugManager.gd` - Debug system integration
|
||||||
- `scenes/game/game.gd` - Main game scene with modular gameplay system
|
- `scenes/game/Game.gd` - Main game scene with modular gameplay system
|
||||||
- `scenes/game/gameplays/Match3Gameplay.gd` - Match-3 implementation with input validation
|
- `scenes/game/gameplays/Match3Gameplay.gd` - Match-3 implementation with input validation
|
||||||
- `scenes/game/gameplays/tile.gd` - Instance-based tile behavior without global state
|
- `scenes/game/gameplays/Tile.gd` - Instance-based tile behavior without global state
|
||||||
- `scenes/ui/DebugMenuBase.gd` - Unified debug menu base class
|
- `scenes/ui/DebugMenuBase.gd` - Unified debug menu base class
|
||||||
- `scenes/ui/SettingsMenu.gd` - Settings UI with input validation
|
- `scenes/ui/SettingsMenu.gd` - Settings UI with input validation
|
||||||
- `scenes/game/gameplays/` - Individual gameplay mode implementations
|
- `scenes/game/gameplays/` - Individual gameplay mode implementations
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ for child in children_to_remove:
|
|||||||
|
|
||||||
**Files Improved:**
|
**Files Improved:**
|
||||||
- `scenes/game/gameplays/Match3Gameplay.gd`
|
- `scenes/game/gameplays/Match3Gameplay.gd`
|
||||||
- `scenes/game/gameplays/tile.gd`
|
- `scenes/game/gameplays/Tile.gd`
|
||||||
|
|
||||||
### 2. Error Handling & Recovery
|
### 2. Error Handling & Recovery
|
||||||
|
|
||||||
@@ -112,7 +112,7 @@ static func set_active_gem_pool(gem_indices: Array) -> void:
|
|||||||
```
|
```
|
||||||
|
|
||||||
**Files Improved:**
|
**Files Improved:**
|
||||||
- `scenes/game/gameplays/tile.gd`
|
- `scenes/game/gameplays/Tile.gd`
|
||||||
- `scenes/game/gameplays/Match3Gameplay.gd`
|
- `scenes/game/gameplays/Match3Gameplay.gd`
|
||||||
|
|
||||||
## 🟡 Code Quality Improvements
|
## 🟡 Code Quality Improvements
|
||||||
@@ -289,4 +289,4 @@ func test_volume_validation():
|
|||||||
3. **Event System**: Expand event-driven architecture
|
3. **Event System**: Expand event-driven architecture
|
||||||
4. **Configuration Management**: Centralized configuration system
|
4. **Configuration Management**: Centralized configuration system
|
||||||
|
|
||||||
This document serves as the foundation for maintaining and improving code quality in the Skelly project. All new code should adhere to these standards, and existing code should be gradually updated to meet these requirements.
|
This document serves as the foundation for maintaining and improving code quality in the Skelly project. All new code should adhere to these standards, and existing code should be gradually updated to meet these requirements.
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ game.tscn (Gameplay Container)
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Game Flow
|
### Game Flow
|
||||||
1. **Main Scene** (`scenes/main/main.tscn` + `Main.gd`)
|
1. **Main Scene** (`scenes/main/Main.tscn` + `Main.gd`)
|
||||||
- Application entry point
|
- Application entry point
|
||||||
- Manages splash screen
|
- Manages splash screen
|
||||||
- Transitions to main menu
|
- Transitions to main menu
|
||||||
@@ -112,7 +112,7 @@ game.tscn (Gameplay Container)
|
|||||||
- Audio volume controls
|
- Audio volume controls
|
||||||
- Connected to SettingsManager and AudioManager
|
- Connected to SettingsManager and AudioManager
|
||||||
|
|
||||||
5. **Game Scene** (`scenes/game/game.tscn` + `game.gd`)
|
5. **Game Scene** (`scenes/game/Game.tscn` + `Game.gd`)
|
||||||
- Main gameplay container with modular gameplay system
|
- Main gameplay container with modular gameplay system
|
||||||
- Dynamic loading of gameplay modes into GameplayContainer
|
- Dynamic loading of gameplay modes into GameplayContainer
|
||||||
- Global score management and display
|
- Global score management and display
|
||||||
@@ -145,7 +145,7 @@ scenes/ui/
|
|||||||
The game now uses a modular gameplay architecture where different game modes can be dynamically loaded into the main game scene.
|
The game now uses a modular gameplay architecture where different game modes can be dynamically loaded into the main game scene.
|
||||||
|
|
||||||
### Gameplay Architecture
|
### Gameplay Architecture
|
||||||
- **Main Game Scene** (`scenes/game/game.gd`) - Container and coordinator
|
- **Main Game Scene** (`scenes/game/Game.gd`) - Container and coordinator
|
||||||
- **Gameplay Directory** (`scenes/game/gameplays/`) - Individual gameplay implementations
|
- **Gameplay Directory** (`scenes/game/gameplays/`) - Individual gameplay implementations
|
||||||
- **Dynamic Loading** - Gameplay scenes loaded at runtime based on mode selection
|
- **Dynamic Loading** - Gameplay scenes loaded at runtime based on mode selection
|
||||||
- **Signal-based Communication** - Gameplays communicate with main scene via signals
|
- **Signal-based Communication** - Gameplays communicate with main scene via signals
|
||||||
@@ -168,7 +168,7 @@ The game now uses a modular gameplay architecture where different game modes can
|
|||||||
- Smooth tile position animations with Tween
|
- Smooth tile position animations with Tween
|
||||||
- Cursor-based navigation with visual highlighting and bounds checking
|
- Cursor-based navigation with visual highlighting and bounds checking
|
||||||
|
|
||||||
2. **Tile System** (`scenes/game/gameplays/tile.gd` + `Tile.tscn`)
|
2. **Tile System** (`scenes/game/gameplays/Tile.gd` + `Tile.tscn`)
|
||||||
- Tile behavior with instance-based architecture (no global state)
|
- Tile behavior with instance-based architecture (no global state)
|
||||||
- Gem type management with validation and bounds checking
|
- Gem type management with validation and bounds checking
|
||||||
- Visual representation with scaling and color
|
- Visual representation with scaling and color
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ config_version=5
|
|||||||
[application]
|
[application]
|
||||||
|
|
||||||
config/name="Skelly"
|
config/name="Skelly"
|
||||||
run/main_scene="res://scenes/main/main.tscn"
|
run/main_scene="res://scenes/main/Main.tscn"
|
||||||
config/features=PackedStringArray("4.4", "Mobile")
|
config/features=PackedStringArray("4.4", "Mobile")
|
||||||
config/icon="res://icon.svg"
|
config/icon="res://icon.svg"
|
||||||
boot_splash/handheld/orientation=0
|
boot_splash/handheld/orientation=0
|
||||||
@@ -222,6 +222,6 @@ locale/translations=PackedStringArray("res://localization/MainStrings.en.transla
|
|||||||
[rendering]
|
[rendering]
|
||||||
|
|
||||||
textures/canvas_textures/default_texture_filter=0
|
textures/canvas_textures/default_texture_filter=0
|
||||||
textures/vram_compression/import_etc2_astc=true
|
|
||||||
renderer/rendering_method="gl_compatibility"
|
renderer/rendering_method="gl_compatibility"
|
||||||
renderer/rendering_method.mobile="gl_compatibility"
|
renderer/rendering_method.mobile="gl_compatibility"
|
||||||
|
textures/vram_compression/import_etc2_astc=true
|
||||||
|
|||||||
@@ -470,7 +470,7 @@ func regenerate_grid():
|
|||||||
# More robust tile detection
|
# More robust tile detection
|
||||||
if child.has_method("get_script") and child.get_script():
|
if child.has_method("get_script") and child.get_script():
|
||||||
var script_path = child.get_script().resource_path
|
var script_path = child.get_script().resource_path
|
||||||
if script_path == "res://scenes/game/gameplays/tile.gd":
|
if script_path == "res://scenes/game/gameplays/Tile.gd":
|
||||||
children_to_remove.append(child)
|
children_to_remove.append(child)
|
||||||
removed_count += 1
|
removed_count += 1
|
||||||
elif "grid_position" in child: # Fallback detection
|
elif "grid_position" in child: # Fallback detection
|
||||||
@@ -1084,7 +1084,7 @@ func _restore_grid_from_layout(grid_layout: Array, active_gems: Array[int]) -> v
|
|||||||
for child in get_children():
|
for child in get_children():
|
||||||
if child.has_method("get_script") and child.get_script():
|
if child.has_method("get_script") and child.get_script():
|
||||||
var script_path = child.get_script().resource_path
|
var script_path = child.get_script().resource_path
|
||||||
if script_path == "res://scenes/game/gameplays/tile.gd":
|
if script_path == "res://scenes/game/gameplays/Tile.gd":
|
||||||
all_tile_children.append(child)
|
all_tile_children.append(child)
|
||||||
|
|
||||||
DebugManager.log_debug(
|
DebugManager.log_debug(
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ static func restore_grid_from_layout(
|
|||||||
for child in match3_node.get_children():
|
for child in match3_node.get_children():
|
||||||
if child.has_method("get_script") and child.get_script():
|
if child.has_method("get_script") and child.get_script():
|
||||||
var script_path = child.get_script().resource_path
|
var script_path = child.get_script().resource_path
|
||||||
if script_path == "res://scenes/game/gameplays/tile.gd":
|
if script_path == "res://scenes/game/gameplays/Tile.gd":
|
||||||
all_tile_children.append(child)
|
all_tile_children.append(child)
|
||||||
|
|
||||||
# Remove all found tile children
|
# Remove all found tile children
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[gd_scene load_steps=2 format=3 uid="uid://bnk1gqom3oi6q"]
|
[gd_scene load_steps=2 format=3 uid="uid://bnk1gqom3oi6q"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://scenes/game/gameplays/tile.gd" id="1_tile_script"]
|
[ext_resource type="Script" path="res://scenes/game/gameplays/Tile.gd" id="1_tile_script"]
|
||||||
|
|
||||||
[node name="Tile" type="Node2D"]
|
[node name="Tile" type="Node2D"]
|
||||||
script = ExtResource("1_tile_script")
|
script = ExtResource("1_tile_script")
|
||||||
|
|||||||
@@ -6,8 +6,9 @@
|
|||||||
|
|
||||||
extends Node
|
extends Node
|
||||||
|
|
||||||
const GAME_SCENE_PATH := "res://scenes/game/game.tscn"
|
const GAME_SCENE_PATH := "res://scenes/game/Game.tscn"
|
||||||
const MAIN_SCENE_PATH := "res://scenes/main/main.tscn"
|
const MAIN_SCENE_PATH := "res://scenes/main/Main.tscn"
|
||||||
|
const CREDITS_SCENE_PATH := "res://scenes/ui/Credits.tscn"
|
||||||
|
|
||||||
var pending_gameplay_mode: String = "match3"
|
var pending_gameplay_mode: String = "match3"
|
||||||
var is_changing_scene: bool = false
|
var is_changing_scene: bool = false
|
||||||
@@ -97,6 +98,41 @@ func save_game() -> void:
|
|||||||
DebugManager.log_info("Game saved with score: %d" % current_score, "GameManager")
|
DebugManager.log_info("Game saved with score: %d" % current_score, "GameManager")
|
||||||
|
|
||||||
|
|
||||||
|
func show_credits() -> void:
|
||||||
|
"""Show credits scene with race condition protection"""
|
||||||
|
# Prevent concurrent scene changes
|
||||||
|
if is_changing_scene:
|
||||||
|
DebugManager.log_warn(
|
||||||
|
"Scene change already in progress, ignoring show credits request", "GameManager"
|
||||||
|
)
|
||||||
|
return
|
||||||
|
|
||||||
|
is_changing_scene = true
|
||||||
|
DebugManager.log_info("Attempting to show credits scene", "GameManager")
|
||||||
|
|
||||||
|
var packed_scene := load(CREDITS_SCENE_PATH)
|
||||||
|
if not packed_scene or not packed_scene is PackedScene:
|
||||||
|
DebugManager.log_error(
|
||||||
|
"Failed to load Credits scene at: %s" % CREDITS_SCENE_PATH, "GameManager"
|
||||||
|
)
|
||||||
|
is_changing_scene = false
|
||||||
|
return
|
||||||
|
|
||||||
|
var result = get_tree().change_scene_to_packed(packed_scene)
|
||||||
|
if result != OK:
|
||||||
|
DebugManager.log_error(
|
||||||
|
"Failed to change to credits scene (Error code: %d)" % result, "GameManager"
|
||||||
|
)
|
||||||
|
is_changing_scene = false
|
||||||
|
return
|
||||||
|
|
||||||
|
DebugManager.log_info("Successfully loaded credits scene", "GameManager")
|
||||||
|
|
||||||
|
# Wait for scene to be ready, then mark scene change as complete
|
||||||
|
await get_tree().process_frame
|
||||||
|
is_changing_scene = false
|
||||||
|
|
||||||
|
|
||||||
func exit_to_main_menu() -> void:
|
func exit_to_main_menu() -> void:
|
||||||
"""Exit to main menu with race condition protection"""
|
"""Exit to main menu with race condition protection"""
|
||||||
# Prevent concurrent scene changes
|
# Prevent concurrent scene changes
|
||||||
|
|||||||
@@ -148,8 +148,8 @@ func test_critical_scenes():
|
|||||||
|
|
||||||
# Define critical scenes that must work
|
# Define critical scenes that must work
|
||||||
var critical_scenes = [
|
var critical_scenes = [
|
||||||
"res://scenes/main/main.tscn",
|
"res://scenes/main/Main.tscn",
|
||||||
"res://scenes/game/game.tscn",
|
"res://scenes/game/Game.tscn",
|
||||||
"res://scenes/ui/MainMenu.tscn",
|
"res://scenes/ui/MainMenu.tscn",
|
||||||
"res://scenes/game/gameplays/Match3Gameplay.tscn"
|
"res://scenes/game/gameplays/Match3Gameplay.tscn"
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user