mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Core remove legacy patch (#1047)
Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com>
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
import Utils
|
||||
from Patch import read_rom, APDeltaPatch
|
||||
from worlds.Files import APDeltaPatch
|
||||
from .Aesthetics import generate_shuffled_header_data
|
||||
from .Locations import lookup_id_to_name, all_locations
|
||||
from .Levels import level_info_dict, full_level_list, submap_level_list, location_id_to_level_id
|
||||
from .Levels import level_info_dict
|
||||
from .Names.TextBox import generate_goal_text, title_text_mapping, generate_text_box
|
||||
|
||||
USHASH = 'cdd3c8c37322978ca8669b34bc89c804'
|
||||
@@ -69,7 +68,7 @@ class LocalRom:
|
||||
self.orig_buffer = None
|
||||
|
||||
with open(file, 'rb') as stream:
|
||||
self.buffer = read_rom(stream)
|
||||
self.buffer = Utils.read_snes_rom(stream)
|
||||
|
||||
def read_bit(self, address: int, bit_number: int) -> bool:
|
||||
bitflag = (1 << bit_number)
|
||||
@@ -827,7 +826,7 @@ def get_base_rom_bytes(file_name: str = "") -> bytes:
|
||||
base_rom_bytes = getattr(get_base_rom_bytes, "base_rom_bytes", None)
|
||||
if not base_rom_bytes:
|
||||
file_name = get_base_rom_path(file_name)
|
||||
base_rom_bytes = bytes(read_rom(open(file_name, "rb")))
|
||||
base_rom_bytes = bytes(Utils.read_snes_rom(open(file_name, "rb")))
|
||||
|
||||
basemd5 = hashlib.md5()
|
||||
basemd5.update(base_rom_bytes)
|
||||
@@ -837,6 +836,7 @@ def get_base_rom_bytes(file_name: str = "") -> bytes:
|
||||
get_base_rom_bytes.base_rom_bytes = base_rom_bytes
|
||||
return base_rom_bytes
|
||||
|
||||
|
||||
def get_base_rom_path(file_name: str = "") -> str:
|
||||
options = Utils.get_options()
|
||||
if not file_name:
|
||||
|
@@ -14,7 +14,6 @@ from ..generic.Rules import add_rule
|
||||
from .Names import ItemName, LocationName
|
||||
from ..AutoWorld import WebWorld, World
|
||||
from .Rom import LocalRom, patch_rom, get_base_rom_path, SMWDeltaPatch
|
||||
import Patch
|
||||
|
||||
|
||||
class SMWWeb(WebWorld):
|
||||
@@ -146,6 +145,7 @@ class SMWWorld(World):
|
||||
|
||||
|
||||
def generate_output(self, output_directory: str):
|
||||
rompath = "" # if variable is not declared finally clause may fail
|
||||
try:
|
||||
world = self.world
|
||||
player = self.player
|
||||
@@ -167,9 +167,9 @@ class SMWWorld(World):
|
||||
except:
|
||||
raise
|
||||
finally:
|
||||
self.rom_name_available_event.set() # make sure threading continues and errors are collected
|
||||
if os.path.exists(rompath):
|
||||
os.unlink(rompath)
|
||||
self.rom_name_available_event.set() # make sure threading continues and errors are collected
|
||||
|
||||
def modify_multidata(self, multidata: dict):
|
||||
import base64
|
||||
|
Reference in New Issue
Block a user