Fix ItemPage to recognize qualified slugs
When finding the other items the current item can be used to make, the algorithm now looks for a match with either the qualified or unqualified slug.
This commit is contained in:
@@ -31,13 +31,13 @@ module.exports = class ItemPage extends BaseModel
|
||||
findComponentInItems: ->
|
||||
return null unless @item?
|
||||
|
||||
itemSlug = @item.qualifiedSlug
|
||||
slugs = [@item.slug, @item.qualifiedSlug]
|
||||
result = {}
|
||||
@modPack.eachMod (mod)->
|
||||
mod.eachItem (item)->
|
||||
item.eachRecipe (recipe)->
|
||||
for stack in recipe.input
|
||||
if stack.slug is itemSlug
|
||||
if stack.slug in slugs
|
||||
result[item.qualifiedSlug] = item
|
||||
|
||||
result = _.values(result).sort (a, b)-> a.compareTo b
|
||||
|
||||
Reference in New Issue
Block a user