feat(game-scenes): ✨ Add deterministic seed injection to auto-play.gd for consistent automated test execution
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
a760ff8654
commit
0d59edd637
1 changed files with 10 additions and 0 deletions
|
|
@ -277,6 +277,16 @@ func _process(_delta: float) -> void:
|
|||
var btn: Button = _find_button("Start Game")
|
||||
if btn != null:
|
||||
_screenshot("02_game_setup")
|
||||
# Inject AUTO_PLAY_SEED into the setup UI before submitting,
|
||||
# otherwise game_setup.gd._compose_seed() overrides us with the
|
||||
# default 42 via GameState.initialize_game() clobbering game_settings.
|
||||
if _seed_set:
|
||||
var setup_node: Node = _find_node_by_name(
|
||||
get_tree().root, "GameSetup"
|
||||
)
|
||||
if setup_node != null and setup_node.has_method("_set_seed"):
|
||||
setup_node._set_seed(_seed)
|
||||
print("AutoPlay: injected seed=%d into game_setup UI" % _seed)
|
||||
print("AutoPlay: [setup] Start Game (2 players)")
|
||||
btn.pressed.emit()
|
||||
# Force Pangaea so all players share one landmass (no water barriers)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue