feat(scenes): ✨ Add pre-named output directory support for auto-play test execution
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
fa2748873f
commit
1c93748d83
1 changed files with 7 additions and 1 deletions
|
|
@ -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_<stamp>_seed<N>/ 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()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue