pushing current changes to go fix tloz bug

This commit is contained in:
Silvris
2023-07-18 00:16:31 -05:00
parent e0bc4cfa20
commit dac5e5aaac
2 changed files with 26 additions and 59 deletions

View File

@@ -2,13 +2,13 @@ from __future__ import annotations
import os
import sys
from typing import Tuple, Optional, TypedDict, Union
from typing import Tuple, Optional, TypedDict
if __name__ == "__main__":
import ModuleUpdate
ModuleUpdate.update()
from worlds.Files import AutoPatchRegister, APDeltaPatch, APProcedurePatch
from worlds.Files import AutoPatchRegister, APProcedurePatch
class RomMeta(TypedDict):
@@ -20,7 +20,7 @@ class RomMeta(TypedDict):
def create_rom_file(patch_file: str) -> Tuple[RomMeta, str]:
auto_handler = AutoPatchRegister.get_handler(patch_file)
if auto_handler:
handler: Union[APDeltaPatch, APProcedurePatch] = auto_handler(patch_file)
handler: APProcedurePatch = auto_handler(patch_file)
target = os.path.splitext(patch_file)[0]+handler.result_file_ending
handler.patch(target)
return {"server": handler.server,