mirror of
https://github.com/ArchipelagoMW/Archipelago.git
synced 2026-03-26 10:43:26 -07:00
initial work on procedure patch
This commit is contained in:
6
Patch.py
6
Patch.py
@@ -2,13 +2,13 @@ from __future__ import annotations
|
||||
|
||||
import os
|
||||
import sys
|
||||
from typing import Tuple, Optional, TypedDict
|
||||
from typing import Tuple, Optional, TypedDict, Union
|
||||
|
||||
if __name__ == "__main__":
|
||||
import ModuleUpdate
|
||||
ModuleUpdate.update()
|
||||
|
||||
from worlds.Files import AutoPatchRegister, APDeltaPatch
|
||||
from worlds.Files import AutoPatchRegister, APDeltaPatch, 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: APDeltaPatch = auto_handler(patch_file)
|
||||
handler: Union[APDeltaPatch, APProcedurePatch] = auto_handler(patch_file)
|
||||
target = os.path.splitext(patch_file)[0]+handler.result_file_ending
|
||||
handler.patch(target)
|
||||
return {"server": handler.server,
|
||||
|
||||
Reference in New Issue
Block a user