Skip to content

Commit

Permalink
Delete spoiler file for race seeds (#169)
Browse files Browse the repository at this point in the history
  • Loading branch information
Miepee authored Jan 28, 2024
1 parent 38b1121 commit f8fac5b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ This format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

### Changed
- Changed sprites for Flashlight, Blindfold, Light Beam, Sonic Boom, Prime 1 Super Missiles, Flamethrower, Ice Spreader and Wave Buster
- The yams.json file is now deleted for race seeds.

## [1.2.8] - 2024-01-27

Expand Down
3 changes: 3 additions & 0 deletions am2r_yams/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ def patch_game(
self.csharp_patcher.Main(input_data_win, output_data_win, json_file)

# Move temp dir to output dir and get rid of it. Also delete original data.win
# Also delete the json if we're on a race seed.
if patch_data.get("configuration_identifier", {}).get("contains_spoiler", False):
input_data_win_path.parent.joinpath("yams-data.json").unlink()
input_data_win_path.unlink()
progress_update("Moving to output directory...", 0.8)
shutil.copytree(tempdir.name, output_path, dirs_exist_ok=True)
Expand Down

0 comments on commit f8fac5b

Please sign in to comment.