Skip to content

Commit

Permalink
YGO06: prevent multiple players affecting each others procedure patch (
Browse files Browse the repository at this point in the history
  • Loading branch information
Rensen3 authored Jun 1, 2024
1 parent f2587d5 commit 91c8960
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 4 additions & 2 deletions worlds/yugioh06/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,12 +399,14 @@ def generate_output(self, output_directory: str):
self.playerName.extend([0] * (0x20 - len(self.playerName)))
patch = YGO06ProcedurePatch(player=self.player, player_name=self.multiworld.player_name[self.player])
patch.write_file("base_patch.bsdiff4", pkgutil.get_data(__name__, "patch.bsdiff4"))
procedure = [("apply_bsdiff4", ["base_patch.bsdiff4"]), ("apply_tokens", ["token_data.bin"])]
if self.is_draft_mode:
patch.procedure.insert(1, ("apply_bsdiff4", ["draft_patch.bsdiff4"]))
procedure.insert(1, ("apply_bsdiff4", ["draft_patch.bsdiff4"]))
patch.write_file("draft_patch.bsdiff4", pkgutil.get_data(__name__, "patches/draft.bsdiff4"))
if self.options.ocg_arts:
patch.procedure.insert(1, ("apply_bsdiff4", ["ocg_patch.bsdiff4"]))
procedure.insert(1, ("apply_bsdiff4", ["ocg_patch.bsdiff4"]))
patch.write_file("ocg_patch.bsdiff4", pkgutil.get_data(__name__, "patches/ocg.bsdiff4"))
patch.procedure = procedure
write_tokens(self, patch)

# Write Output
Expand Down
2 changes: 0 additions & 2 deletions worlds/yugioh06/rom.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ class YGO06ProcedurePatch(APProcedurePatch, APTokenMixin):
patch_file_ending = ".apygo06"
result_file_ending = ".gba"

procedure = [("apply_bsdiff4", ["base_patch.bsdiff4"]), ("apply_tokens", ["token_data.bin"])]

@classmethod
def get_source_data(cls) -> bytes:
return get_base_rom_bytes()
Expand Down

0 comments on commit 91c8960

Please sign in to comment.