Skip to content

Commit

Permalink
revert loot_filter changes just add the mark_as_favorite condition
Browse files Browse the repository at this point in the history
  • Loading branch information
geocine committed Jul 3, 2024
1 parent 10dd037 commit da19e51
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/loot_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def check_items(inv: InventoryBase, force_refresh: ItemRefreshType):
start_time = None
img = None
for item in occupied:
if item.is_junk or (item.is_fav and IniConfigLoader().general.mark_as_favorite):
if item.is_junk or item.is_fav:
continue
if start_time is not None:
LOGGER.debug(f"Runtime (FullItemCheck): {time.time() - start_time:.2f}s")
Expand Down Expand Up @@ -114,12 +114,7 @@ def check_items(inv: InventoryBase, force_refresh: ItemRefreshType):
res = Filter().should_keep(item_descr)
matched_any_affixes = len(res.matched) > 0 and len(res.matched[0].matched_affixes) > 0
LOGGER.debug(f" Runtime (Filter): {time.time() - start_filter:.2f}s")
if not res.keep and not IniConfigLoader().general.mark_as_favorite and item.is_fav:
keyboard.send("space")
time.sleep(0.17)
keyboard.send("space")
time.sleep(0.13)
elif not res.keep:
if not res.keep:
keyboard.send("space")
time.sleep(0.13)
elif res.keep and (matched_any_affixes or item_descr.rarity == ItemRarity.Unique) and IniConfigLoader().general.mark_as_favorite:
Expand All @@ -128,9 +123,6 @@ def check_items(inv: InventoryBase, force_refresh: ItemRefreshType):
time.sleep(0.17)
keyboard.send("space")
time.sleep(0.13)
elif res.keep and (matched_any_affixes or item_descr.rarity == ItemRarity.Unique) and not IniConfigLoader().general.mark_as_favorite and item.is_fav:
keyboard.send("space")
time.sleep(0.17)


def reset_item_status(occupied, inv):
Expand Down

0 comments on commit da19e51

Please sign in to comment.