SM and SMZ3 apworld support (#1677)

This commit is contained in:
lordlou
2023-04-08 16:52:34 -04:00
committed by GitHub
parent f4035b8621
commit 84402a1b55
86 changed files with 522 additions and 445 deletions

View File

@@ -1,6 +1,6 @@
import itertools
from worlds.sm.variaRandomizer.utils.utils import range_union
from ..utils.utils import range_union, openFile
# adapted from ips-util for python 3.2 (https://pypi.org/project/ips-util/)
class IPS_Patch(object):
@@ -25,7 +25,7 @@ class IPS_Patch(object):
@staticmethod
def load(filename):
loaded_patch = IPS_Patch()
with open(filename, 'rb') as file:
with openFile(filename, 'rb') as file:
header = file.read(5)
if header != b'PATCH':
raise Exception('Not a valid IPS patch file!')