Archipelago/worlds/subnautica/Locations.py

13 lines
369 B
Python
Raw Normal View History

2021-07-17 16:07:45 +00:00
import json
2021-07-23 18:04:51 +00:00
import os
2021-07-17 16:07:45 +00:00
2021-07-23 18:04:51 +00:00
with open(os.path.join(os.path.dirname(__file__), 'locations.json'), 'r') as file:
2021-07-17 16:07:45 +00:00
location_table = json.loads(file.read())
lookup_id_to_name = {}
for item in location_table:
lookup_id_to_name[item["id"]] = item["name"]
lookup_id_to_name[None] = "Neptune Launch"
lookup_name_to_id = {name: id for id, name in lookup_id_to_name.items()}