Skip to content

Commit

Permalink
#21 Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinscham committed Jul 14, 2022
1 parent 1b2ab2f commit 6b60684
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion disenchanter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -524,11 +524,14 @@ def handle_event_tokens
recipe_targets = %w[CHEST_187]
end

token_recipes = token_recipes.select { |r| !r["outputs"][0].nil? }

token_recipes =
token_recipes.select do |r|
recipe_targets.include? r["outputs"][0]["lootName"]
end
token_recipes.sort_by { |r| r["slots"][0]["quantity"] }.reverse!
token_recipes =
token_recipes.sort_by { |r| r["slots"][0]["quantity"] }.reverse!

token_recipes.each do |r|
puts "Recipe found: #{r["contextMenuText"]} for #{r["slots"][0]["quantity"]} Tokens".light_black
Expand Down

0 comments on commit 6b60684

Please sign in to comment.