fix(core): resolve review findings in Sprint 3-4

- Fix SaveManager reset_game to use DirAccess.remove correctly
- Add null check for FileAccess.open in save_game
- Fix AudioManager crossfade tween callback chain
- Replace fragile absolute HUD path with relative onready
- Guard character position save against empty id
- Add GameState.has_character_position helper
- Emit room_changed signal after tween completes
- Add target_floor validation in ElevatorButton
- Persist audio settings via GameState
- Add class_name to RoomNavigator, AudioManager, HUD

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Steven Wroblewski
2026-04-17 12:22:27 +02:00
parent 13db45bb04
commit 6b0c41bbfd
9 changed files with 36 additions and 14 deletions

View File

@@ -7,6 +7,12 @@ signal character_moved(character_id: String, position: Vector2)
var _character_positions: Dictionary = {}
var _object_states: Dictionary = {}
var current_room: String = "reception"
var music_volume: float = 0.6
var sfx_volume: float = 1.0
func has_character_position(id: String) -> bool:
return _character_positions.has(id)
func get_character_position(id: String) -> Vector2:
@@ -33,6 +39,8 @@ func get_save_data() -> Dictionary:
"character_positions": _character_positions,
"object_states": _object_states,
"current_room": current_room,
"music_volume": music_volume,
"sfx_volume": sfx_volume,
}
@@ -43,3 +51,7 @@ func apply_save_data(data: Dictionary) -> void:
_object_states = data["object_states"]
if data.has("current_room"):
current_room = data["current_room"]
if data.has("music_volume"):
music_volume = data["music_volume"]
if data.has("sfx_volume"):
sfx_volume = data["sfx_volume"]