diff --git a/worlds/hk/Items.py b/worlds/hk/Items.py index 3c2273d2..6bdaaa07 100644 --- a/worlds/hk/Items.py +++ b/worlds/hk/Items.py @@ -18,3 +18,7 @@ lookup_id_to_name: Dict[int, str] = {data.id: item_name for item_name, data in i lookup_type_to_names: Dict[str, Set[str]] = {} for item, item_data in item_table.items(): lookup_type_to_names.setdefault(item_data.type, set()).add(item) + +item_name_groups = {group: lookup_type_to_names[group] for group in ("Skill", "Charm", "Mask", "Vessel", + "Relic", "Root", "Map", "Stag", "Cocoon", + "Soul", "DreamWarrior", "DreamBoss")} diff --git a/worlds/hk/__init__.py b/worlds/hk/__init__.py index 89c254a0..0b6ffceb 100644 --- a/worlds/hk/__init__.py +++ b/worlds/hk/__init__.py @@ -6,7 +6,7 @@ from collections import Counter logger = logging.getLogger("Hollow Knight") -from .Items import item_table, lookup_type_to_names +from .Items import item_table, lookup_type_to_names, item_name_groups from .Regions import create_regions from .Rules import set_rules from .Options import hollow_knight_options, hollow_knight_randomize_options, disabled @@ -88,6 +88,7 @@ class HKWorld(World): item_name_to_id = {name: data.id for name, data in item_table.items()} location_name_to_id = {location_name: location_id for location_id, location_name in enumerate(locations, start=0x1000000)} + item_name_groups = item_name_groups ranges: typing.Dict[str, typing.Tuple[int, int]] shops = {"Egg_Shop": "egg", "Grubfather": "grub", "Seer": "essence", "Salubra_(Requires_Charms)": "charm"}