Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete spoiler file for race seeds #169

Merged
merged 1 commit into from
Jan 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading