Files
Grinch-AP/worlds/raft/Locations.py

12 lines
369 B
Python
Raw Permalink Normal View History

2022-01-21 13:41:53 -08:00
import json
import os
with open(os.path.join(os.path.dirname(__file__), 'locations.json'), 'r') as file:
location_table = json.loads(file.read())
lookup_id_to_name = {}
for item in location_table:
lookup_id_to_name[item["id"]] = item["name"]
2022-07-05 19:37:08 -07:00
lookup_id_to_name[None] = "Utopia Complete"
2022-01-21 13:41:53 -08:00
lookup_name_to_id = {name: id for id, name in lookup_id_to_name.items()}