From 6f1fc2ad4eba801e9b536752eea03b80b6b1c948 Mon Sep 17 00:00:00 2001 From: CaitSith2 Date: Thu, 21 Jan 2021 19:38:41 -0800 Subject: [PATCH] Store region/item name/id maps in multidata --- Main.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Main.py b/Main.py index c2113094..a789c8a0 100644 --- a/Main.py +++ b/Main.py @@ -11,8 +11,8 @@ import concurrent.futures from BaseClasses import World, CollectionState, Item, Region, Location from Shops import ShopSlotFill, create_shops, SHOP_ID_START -from Items import ItemFactory, item_table, item_name_groups -from Regions import create_regions, mark_light_world_regions, lookup_vanilla_location_to_entrance +from Items import ItemFactory, item_table, item_name_groups, lookup_id_to_name as lookup_items_id_to_name +from Regions import create_regions, mark_light_world_regions, lookup_vanilla_location_to_entrance, lookup_name_to_id as lookup_region_name_to_id, lookup_id_to_name as lookup_region_id_to_name from InvertedRegions import create_inverted_regions, mark_dark_world_regions from EntranceShuffle import link_entrances, link_inverted_entrances, plando_connect from Rom import patch_rom, patch_race_rom, patch_enemizer, apply_rom_settings, LocalRom, get_hash_string @@ -422,7 +422,10 @@ def main(args, seed=None): "precollected_items": precollected_items, "version": _version_tuple, "tags": multidatatags, - "minimum_versions": minimum_versions + "minimum_versions": minimum_versions, + "lookup_region_id_to_name": lookup_region_id_to_name, + "lookup_items_id_to_name": {key: value for key, value in lookup_items_id_to_name.items() if isinstance(key, int)}, + "item_name_groups": {key: list(value) for key, value in item_name_groups.items()} }).encode("utf-8"), 9) with open(output_path('%s.multidata' % outfilebase), 'wb') as f: