From 6783aa2c137fd9491d4ba6aa54922bc8e782cc4e Mon Sep 17 00:00:00 2001 From: Magnemania Date: Wed, 13 Dec 2023 22:27:16 -0500 Subject: [PATCH] Fixed important_for_filtering item field --- worlds/sc2/Items.py | 3 +-- worlds/sc2/PoolFilter.py | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/worlds/sc2/Items.py b/worlds/sc2/Items.py index f10a63b2b468..17a1a375e3a3 100644 --- a/worlds/sc2/Items.py +++ b/worlds/sc2/Items.py @@ -17,8 +17,7 @@ class ItemData(typing.NamedTuple): parent_item: typing.Optional[str] = None origin: typing.Set[str] = {"wol"} description: typing.Optional[str] = None - important_for_filtering: bool = classification == ItemClassification.progression \ - or classification == ItemClassification.progression_skip_balancing + important_for_filtering: bool = False class StarcraftItem(Item): diff --git a/worlds/sc2/PoolFilter.py b/worlds/sc2/PoolFilter.py index 6b2debb97685..07e5a59f7300 100644 --- a/worlds/sc2/PoolFilter.py +++ b/worlds/sc2/PoolFilter.py @@ -225,9 +225,11 @@ def generate_reduced_inventory(self, inventory_size: int, mission_requirements: """Attempts to generate a reduced inventory that can fulfill the mission requirements.""" inventory = list(self.item_pool) locked_items = list(self.locked_items) + item_list = get_full_item_list() self.logical_inventory = [ item.name for item in inventory + locked_items + self.existing_items - if get_full_item_list()[item.name].important_for_filtering # Track all Progression items and those with complex rules for filtering + if item_list[item.name].classification in (ItemClassification.progression, ItemClassification.progression_skip_balancing) + or item_list[item.name].important_for_filtering # Track all Progression items and those with complex rules for filtering ] requirements = mission_requirements parent_items = self.item_children.keys()