Factorio: make apworld compatible(#935)

This commit is contained in:
Fabian Dill
2022-08-18 01:33:40 +02:00
committed by GitHub
parent a1aa9c17ff
commit 0d61192c67
4 changed files with 26 additions and 7 deletions

View File

@@ -19,8 +19,8 @@ pool = ThreadPoolExecutor(1)
def load_json_data(data_name: str) -> Union[List[str], Dict[str, Any]]:
with open(os.path.join(source_folder, f"{data_name}.json")) as f:
return json.load(f)
import pkgutil
return json.loads(pkgutil.get_data(__name__, "data/" + data_name + ".json").decode())
techs_future = pool.submit(load_json_data, "techs")