Further fixes of how passthrough items are handled
* When evaluating a plan, only give the pass-through treatment to items if the step they're part of was actually executed * When marking a step "complete", ignore passthrough items
This commit is contained in:
@@ -33,10 +33,9 @@ module.exports = class CraftPageController extends PageController
|
||||
@_router = options.router
|
||||
@_storage = options.storage
|
||||
|
||||
# c.event Methods ################################################################################
|
||||
# Event Methods ################################################################################
|
||||
|
||||
onHaveInventoryChanged: ->
|
||||
logger.warning => "storing have: #{@model.craftsman.have.unparse()}"
|
||||
@_storage.store 'crafting-plan:have', @model.craftsman.have.unparse()
|
||||
|
||||
onMoveNeedToHave: (itemSlug)->
|
||||
@@ -89,7 +88,6 @@ module.exports = class CraftPageController extends PageController
|
||||
router: @_router
|
||||
@_haveInventoryController.on c.event.button.first, (controller, itemSlug)=>
|
||||
@onRemoveFromHaveInventory itemSlug
|
||||
@_haveInventoryController.on c.event.change, (c)=> @onHaveInventoryChanged()
|
||||
|
||||
@_needInventoryController = @addChild InventoryController, '.need .view__inventory',
|
||||
editable: false
|
||||
@@ -117,6 +115,7 @@ module.exports = class CraftPageController extends PageController
|
||||
onWillRender: ->
|
||||
@model.craftsman.have.clear()
|
||||
@model.craftsman.have.parse @_storage.load('crafting-plan:have')
|
||||
@model.craftsman.have.on c.event.change, => @onHaveInventoryChanged()
|
||||
super
|
||||
|
||||
refresh: ->
|
||||
|
||||
@@ -10,6 +10,19 @@
|
||||
.view__adsense
|
||||
|
||||
.right
|
||||
section
|
||||
h3 2016-04-16
|
||||
.panel
|
||||
p.
|
||||
I've been working on adding a new mod, and I ran across a bug which has been in the system for a
|
||||
while now, but which will cause serious problems with a lot of the recipes in the new mod. So, I put
|
||||
the mod aside for a bit to fix it.
|
||||
p.
|
||||
The bug was that when you are making something like an <a
|
||||
href="/browse/forge_multipart/oak_wood_cover">Oak Wood Cover</a> the <a
|
||||
href="/browse/forge_multipart/stone_saw">saw</a> wouldn't be part of the crafting plan. This isn't
|
||||
such a big deal for most things, but for this new mod, it would have been a major problem.
|
||||
|
||||
section
|
||||
h3 2016-04-14
|
||||
.panel
|
||||
|
||||
Reference in New Issue
Block a user