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,15 +1,15 @@

from typing import Any, List
import copy
from worlds.smz3.TotalSMZ3.Text.Dialog import Dialog
from worlds.smz3.TotalSMZ3.Text.Texts import text_folder
from ..Text.Dialog import Dialog
from ..Text.Texts import openFile
from Utils import unsafe_parse_yaml
class StringTable:
@staticmethod
def ParseEntries(resource: str):
with open(resource, 'rb') as f:
with openFile(resource, 'rb') as f:
yaml = str(f.read(), "utf-8")
content = unsafe_parse_yaml(yaml)
@@ -23,7 +23,7 @@ class StringTable:
else: raise Exception(f"Did not expect an object of type {type(value)}")
return result
template = ParseEntries.__func__(text_folder + "/Scripts/StringTable.yaml")
template = ParseEntries.__func__("smz3/TotalSMZ3/Text/Scripts/StringTable.yaml")
def __init__(self):
self.entries = copy.deepcopy(StringTable.template)