fix(client): address PR #67 review — error propagation, test cleanup

SessionManager.new_game() now returns "" on dir creation failure
instead of proceeding with a broken game-id. Main menu guards
against empty return. Test suite tracks and cleans up created
save directories in after_test().

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-25 12:08:48 +01:00
co-authored by Claude Opus 4.6
parent cafa892b1e
commit 5d1d0d000c
3 changed files with 32 additions and 10 deletions
+4 -1
View File
@@ -32,7 +32,10 @@ func _refresh_continue_state() -> void:
func _on_new_game() -> void:
SessionManager.new_game()
var game_id := SessionManager.new_game()
if game_id.is_empty():
push_error("MainMenu: new_game() failed to create save directory — cannot start")
return
get_tree().change_scene_to_file(GAME_SCENE)