From 1c93748d8315404935d9cb9596ce7b925e55c49e Mon Sep 17 00:00:00 2001 From: autocommit Date: Tue, 14 Apr 2026 19:29:13 -0700 Subject: [PATCH] =?UTF-8?q?feat(scenes):=20=E2=9C=A8=20Add=20pre-named=20o?= =?UTF-8?q?utput=20directory=20support=20for=20auto-play=20test=20executio?= =?UTF-8?q?n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- src/game/engine/scenes/tests/auto_play.gd | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/game/engine/scenes/tests/auto_play.gd b/src/game/engine/scenes/tests/auto_play.gd index 3173b8ce..d28ca3ba 100644 --- a/src/game/engine/scenes/tests/auto_play.gd +++ b/src/game/engine/scenes/tests/auto_play.gd @@ -77,7 +77,13 @@ func _ready() -> void: now["year"], now["month"], now["day"], now["hour"], now["minute"], now["second"], ] - _game_dir = _output_dir.path_join("game_%s_seed%d" % [_start_stamp, _seed]) + # If AUTO_PLAY_DIR is already a game__seed/ path (caller named it), + # write directly into it. Otherwise create a subdirectory. + var dir_name: String = _output_dir.get_file() + if dir_name.begins_with("game_") and dir_name.ends_with("_seed%d" % _seed): + _game_dir = _output_dir + else: + _game_dir = _output_dir.path_join("game_%s_seed%d" % [_start_stamp, _seed]) DirAccess.make_dir_recursive_absolute(_game_dir.path_join("saves")) print("AutoPlay: seed=%d stamp=%s dir=%s" % [_seed, _start_stamp, _game_dir]) _write_meta()