Skip to content

Commit

Permalink
Fix sigil filter (#217)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisoro authored May 17, 2024
1 parent e594545 commit 55fe586
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/config/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ class ProfileModel(BaseModel):
model_config = ConfigDict(extra="forbid")
name: str
Affixes: list[DynamicItemFilterModel] = []
Sigils: SigilFilterModel = SigilFilterModel()
Sigils: SigilFilterModel | None = None
Uniques: list[UniqueModel] = []


Expand Down
4 changes: 4 additions & 0 deletions src/item/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ def _check_aspect(item: Item) -> FilterResult:

def _check_sigil(self, item: Item) -> FilterResult:
res = FilterResult(False, [])
if not self.sigil_filters.items():
Logger.info("Matched Sigils")
res.keep = True
res.matched.append(MatchedFilter("default"))
for profile_name, profile_filter in self.sigil_filters.items():
# check item power
if not self._match_item_power(max_power=profile_filter.maxTier, min_power=profile_filter.minTier, item_power=item.power):
Expand Down

0 comments on commit 55fe586

Please sign in to comment.