fix: refine game mode state tracking and turn handling

* Centralize ball state generation in `BaseMode`
* Track turn count, player, and ball state consistently
* Prevent 8-ball, 9-ball, and colored snooker balls from being marked valid when reaped/sunk
* Update mode initialization and ball-state assignment
* Normalize Free Ball mode node name to `freeball`
This commit is contained in:
2026-08-11 23:59:30 -05:00
parent e3bdb21cd2
commit 84b3600044
9 changed files with 96 additions and 28 deletions

View File

@@ -21,5 +21,5 @@ func _balls_stopped_moving() -> void:
mode.handle_switch_user()
func set_mode(game_mode) -> void:
mode = Globals.game_data.GameMode.get(game_mode).new()
mode.generate_ball_state()
mode = Globals.game_data.GameMode.get(game_mode).new()
mode.ball_state = mode.generate_ball_state()