Skip to content
This repository has been archived by the owner on Jun 25, 2020. It is now read-only.

Commit

Permalink
hookshot update towards #2.
Browse files Browse the repository at this point in the history
  • Loading branch information
bmarwell committed Aug 18, 2018
1 parent 867a145 commit 646e0e8
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
20 changes: 20 additions & 0 deletions src/renderer/js/ItemUpdates.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
2 changes: 1 addition & 1 deletion src/renderer/views/Tracker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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']},
Expand Down

0 comments on commit 646e0e8

Please sign in to comment.