Skip to content

Commit

Permalink
Delete music rando side effects before patching
Browse files Browse the repository at this point in the history
Fixes #223
  • Loading branch information
Miepee committed Jul 5, 2024
1 parent 6cdebd2 commit 583977b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions am2r_yams/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ def patch_game(
if profile_xml_path.exists():
profile_xml_path.unlink()

# Remove music files if they exist in the output path, but not in the input path, to avoid music rando side effects
for f in ["mustester.ogg", "musitemamb2.ogg"]:
if output_path.joinpath(f).is_file() and not tempdir.name.joinpath(f).is_file():
output_path.joinpath(f).unlink()

# Patch data.win
progress_update("Patching data file...", 0.6)
self.csharp_patcher.Main(input_data_win, output_data_win, json_file)
Expand Down

0 comments on commit 583977b

Please sign in to comment.