Skip to content

Commit

Permalink
Fixed important_for_filtering item field
Browse files Browse the repository at this point in the history
  • Loading branch information
Magnemania committed Dec 14, 2023
1 parent 08fd7dd commit 6783aa2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions worlds/sc2/Items.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
4 changes: 3 additions & 1 deletion worlds/sc2/PoolFilter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 6783aa2

Please sign in to comment.