X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=resources%2Fjs%2Fhelpers%2Ftracker.js;h=4a907ffb47586655de4e1c79f5271020a81b545c;hb=cdb12f8f7d161e0e17d23dd1164d3c8b1067be61;hp=f2be2434a3eb69944685b5fd503c765d75089196;hpb=3213c82ad2dd75e313d15423e25653596c7ce278;p=alttp.git diff --git a/resources/js/helpers/tracker.js b/resources/js/helpers/tracker.js index f2be243..4a907ff 100644 --- a/resources/js/helpers/tracker.js +++ b/resources/js/helpers/tracker.js @@ -92,7 +92,7 @@ export const DUNGEONS = [ mask: DUNGEON_MASKS.HC, checks: [ 'dark-cross', - 'hc-map', + 'hc-map-chest', 'hc-boom', 'hc-cell', 'sanc', @@ -905,7 +905,7 @@ export const UNDERWORLD_LOCATIONS = [ chest: 0, }, { - id: 'hc-map', + id: 'hc-map-chest', area: 'hc', room: 0x72, chest: 0, @@ -1588,6 +1588,16 @@ export const highestActive = (state, names) => { return null; }; +export const clearAll = names => state => { + const changes = names.reduce((acc, cur) => ({ ...acc, [cur]: true }), {}); + return { ...state, ...changes }; +}; + +export const unclearAll = names => state => { + const changes = names.reduce((acc, cur) => ({ ...acc, [cur]: false }), {}); + return { ...state, ...changes }; +}; + export const hasDungeonBoss = (state, dungeon) => !!state[`${dungeon.id}-boss-defeated`]; export const getDungeonBoss = (state, dungeon) =>