Clear recipeName field on focus
This commit is contained in:
@@ -49,7 +49,6 @@ module.exports = class CraftingPlan
|
||||
_processPending: ->
|
||||
targetItem = @_pending.pop()
|
||||
return unless targetItem?
|
||||
logger.debug "Processing targetItem: #{targetItem}"
|
||||
|
||||
return if @modPack.isRawMaterial targetItem.name
|
||||
|
||||
@@ -57,13 +56,11 @@ module.exports = class CraftingPlan
|
||||
return if not recipes.length > 0
|
||||
|
||||
recipe = recipes[0]
|
||||
logger.debug "Using recipe: #{recipe}"
|
||||
|
||||
if @includingTools
|
||||
for tool in recipe.tools
|
||||
totalExpected = @result.quantityOf(tool.name) + @_expected.quantityOf(tool.name)
|
||||
if totalExpected < tool.quantity
|
||||
logger.debug "Need to build tool: #{tool}"
|
||||
@_pending.add tool.name, tool.quantity
|
||||
@_expected.add tool.name, tool.quantity
|
||||
|
||||
@@ -80,7 +77,6 @@ module.exports = class CraftingPlan
|
||||
quantityAvailable = @result.quantityOf item.name
|
||||
quantityUsed = Math.min quantityAvailable, item.quantity
|
||||
quantityNeeded = item.quantity - quantityUsed
|
||||
logger.debug "processing input item: #{item}, a:#{quantityAvailable}, u:#{quantityUsed}, n:#{quantityNeeded}"
|
||||
|
||||
@result.remove item.name, quantityUsed
|
||||
@_pending.add item.name, quantityNeeded
|
||||
@@ -90,7 +86,6 @@ module.exports = class CraftingPlan
|
||||
quantityMissing = @need.quantityOf item.name
|
||||
quantityUsed = Math.min quantityMissing, item.quantity
|
||||
quantityLeft = item.quantity - quantityUsed
|
||||
logger.debug "processing output item: #{item}, m:#{quantityMissing}, u:#{quantityUsed}, l:#{quantityLeft}"
|
||||
|
||||
@make.add item.name, item.quantity
|
||||
@need.remove item.name, quantityUsed
|
||||
|
||||
Reference in New Issue
Block a user