Bug: Allow 'update' recipes to be found properly
Fix a bug where `ModPack.findRecipes` would only look for recipes for qualified slugs in the mod which added the item, thus missing any recipes added in other mods.
This commit is contained in:
@@ -86,7 +86,6 @@ module.exports = class ModPack extends BaseModel
|
||||
|
||||
for mod in @_mods
|
||||
continue unless mod.enabled
|
||||
continue if itemSlug.isQualified and itemSlug.mod isnt mod.slug
|
||||
mod.findRecipes itemSlug, result
|
||||
|
||||
result.sort (a, b)-> Recipe.compareFor a, b, itemSlug
|
||||
|
||||
@@ -132,9 +132,9 @@ module.exports = class ModVersion extends BaseModel
|
||||
callback recipe
|
||||
|
||||
findRecipes: (itemSlug, result=[])->
|
||||
recipeList = @_recipes[itemSlug.item]
|
||||
if recipeList?
|
||||
for k, recipeList of @_recipes
|
||||
for recipe in recipeList
|
||||
if recipe.produces itemSlug
|
||||
result.push recipe
|
||||
|
||||
return result
|
||||
|
||||
Reference in New Issue
Block a user