Skip to content

Commit

Permalink
fix: Add checkItems to ItemRequirements
Browse files Browse the repository at this point in the history
  • Loading branch information
Zoinkwiz committed Nov 21, 2024
1 parent 4ee2ea3 commit 3d5aadd
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,14 @@ public Color getColor(Client client, QuestHelperConfig config)
return this.check(client) ? config.passColour() : config.failColour();
}

@Override
public boolean checkItems(Client client, List<Item> items)
{
Predicate<ItemRequirement> predicate = r -> r.checkItems(client, items);
int successes = (int) itemRequirements.stream().filter(Objects::nonNull).filter(predicate).count();
return logicType.compare(successes, itemRequirements.size());
}

@Override
public Color getColorConsideringBank(Client client, QuestHelperConfig config)
{
Expand Down

0 comments on commit 3d5aadd

Please sign in to comment.