diff --git a/src/renderer/js/ItemUpdates.js b/src/renderer/js/ItemUpdates.js index 6355f05..721e04d 100644 --- a/src/renderer/js/ItemUpdates.js +++ b/src/renderer/js/ItemUpdates.js @@ -82,6 +82,26 @@ class ItemUpdates { return; } } + + /** + * update hookshot. + * + * @param {trackerItem} trackerItem trackeritem to update. + * @param {Array} params blah. + */ + static hookshot(trackerItem, params) { + if (params[0] === undefined) { + return; + } + + const firstParam = params[0]; + const secondParam = params[1]; + // just 'hook…' or 'hookshot'. + if (['hook'].indexOf(firstParam) >= 0 && (secondParam == null || secondParam === undefined)) { + trackerItem.nextState(); + return; + } + } } export default ItemUpdates; diff --git a/src/renderer/views/Tracker.vue b/src/renderer/views/Tracker.vue index 33f2d7f..0eb68bf 100644 --- a/src/renderer/views/Tracker.vue +++ b/src/renderer/views/Tracker.vue @@ -73,7 +73,7 @@ export default { './static/items/boomerang1.png', './static/items/boomerang2.png', ]}, - {id: 'hookshot', title: 'Hookshot', images: ['./static/items/hookshot.png']}, + {id: 'hookshot', title: 'Hookshot', images: ['./static/items/hookshot.png'], update: ItemUpdate.hookshot}, {id: 'mushroom', title: 'mushroom', images: ['./static/items/mushroom.png']}, {id: 'powder', title: 'powder', images: ['./static/items/powder.png']},