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
|
for mod in @_mods
|
||||||
continue unless mod.enabled
|
continue unless mod.enabled
|
||||||
continue if itemSlug.isQualified and itemSlug.mod isnt mod.slug
|
|
||||||
mod.findRecipes itemSlug, result
|
mod.findRecipes itemSlug, result
|
||||||
|
|
||||||
result.sort (a, b)-> Recipe.compareFor a, b, itemSlug
|
result.sort (a, b)-> Recipe.compareFor a, b, itemSlug
|
||||||
|
|||||||
@@ -132,9 +132,9 @@ module.exports = class ModVersion extends BaseModel
|
|||||||
callback recipe
|
callback recipe
|
||||||
|
|
||||||
findRecipes: (itemSlug, result=[])->
|
findRecipes: (itemSlug, result=[])->
|
||||||
recipeList = @_recipes[itemSlug.item]
|
for k, recipeList of @_recipes
|
||||||
if recipeList?
|
|
||||||
for recipe in recipeList
|
for recipe in recipeList
|
||||||
|
if recipe.produces itemSlug
|
||||||
result.push recipe
|
result.push recipe
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|||||||
Reference in New Issue
Block a user