Files
Grinch-AP/worlds/shivers/Constants.py
GodlFire 8d41430cc8 Shivers: Implement New Game (#1836)
Co-authored-by: Mathx2 <Mathx2@gmail.com>
Co-authored-by: Zach Parks <zach@alliware.com>
2023-11-24 17:23:45 -06:00

18 lines
489 B
Python

import os
import json
import pkgutil
def load_data_file(*args) -> dict:
fname = os.path.join("data", *args)
return json.loads(pkgutil.get_data(__name__, fname).decode())
location_id_offset: int = 27000
location_info = load_data_file("locations.json")
location_name_to_id = {name: location_id_offset + index \
for index, name in enumerate(location_info["all_locations"])}
exclusion_info = load_data_file("excluded_locations.json")
region_info = load_data_file("regions.json")