Major updates to the crafting algo.
* Update crafting algo. to favor highest output recipes for making items, and to be more flexible about trying a variety of recipes if some one recipe doesn't work. * Modify crafting algo. to allow crafting of "gatherable" items. * Update logger to support indent/outdent for clearer formatting * Convert IC2 Forge Hammer / Cutter recipes to treat them as tools
This commit is contained in:
@@ -84,14 +84,10 @@ module.exports = class ModPack extends BaseModel
|
||||
findRecipes: (itemSlug, result=[])->
|
||||
return null unless itemSlug?
|
||||
|
||||
if itemSlug.isQualified
|
||||
mod = @getMod itemSlug.mod
|
||||
if mod? then mod.findRecipes itemSlug, result
|
||||
|
||||
if result.length is 0
|
||||
for mod in @_mods
|
||||
continue unless mod.enabled
|
||||
mod.findRecipes itemSlug, result
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user