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()