Pokemon RB: apworld fixes (#2042)

This commit is contained in:
Alchav 2023-07-27 15:43:37 -04:00 committed by GitHub
parent 09c3a99be8
commit eb8855afb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 7 deletions

View File

@ -7,8 +7,8 @@ from typing import TextIO
from BaseClasses import Item, MultiWorld, Tutorial, ItemClassification, LocationProgressType
from Fill import fill_restrictive, FillError, sweep_from_pool
from ..AutoWorld import World, WebWorld
from ..generic.Rules import add_item_rule
from worlds.AutoWorld import World, WebWorld
from worlds.generic.Rules import add_item_rule
from .items import item_table, item_groups
from .locations import location_data, PokemonRBLocation
from .regions import create_regions

View File

@ -2,7 +2,7 @@ import os
import hashlib
import Utils
import bsdiff4
from copy import deepcopy
import pkgutil
from worlds.Files import APDeltaPatch
from .text import encode_text
from .items import item_table
@ -12,7 +12,6 @@ from .rom_addresses import rom_addresses
from .regions import PokemonRBWarp, map_ids
from . import poke_data
def write_quizzes(self, data, random):
def get_quiz(q, a):
@ -198,8 +197,8 @@ def generate_output(self, output_directory: str):
game_version = self.multiworld.game_version[self.player].current_key
data = bytes(get_base_rom_bytes(game_version))
with open(os.path.join(os.path.dirname(__file__), f'basepatch_{game_version}.bsdiff4'), 'rb') as stream:
base_patch = bytes(stream.read())
base_patch = pkgutil.get_data(__name__, f'basepatch_{game_version}.bsdiff4')
data = bytearray(bsdiff4.patch(data, base_patch))
basemd5 = hashlib.md5()

View File

@ -1,4 +1,4 @@
from ..generic.Rules import add_item_rule, add_rule, location_item_name
from worlds.generic.Rules import add_item_rule, add_rule, location_item_name
from .items import item_groups
from . import logic