X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=resources%2Fjs%2Fhelpers%2Ftracker.js;h=f73aa669823ad24db0e345dcd39bc582dadd3fae;hb=e9e1ccc9f8b4a6fc0d4d4ce54a710832227e3da0;hp=6307eda6f026824251eb6e36ebdede95728bbcd0;hpb=ec16505e5fc37ac233db64def11347f5ad21824d;p=alttp.git diff --git a/resources/js/helpers/tracker.js b/resources/js/helpers/tracker.js index 6307eda..f73aa66 100644 --- a/resources/js/helpers/tracker.js +++ b/resources/js/helpers/tracker.js @@ -84,6 +84,7 @@ export const BOSSES = [ export const CONFIG = { bossShuffle: false, + checkCalculation: 'room-data', glitches: 'none', mapLayout: 'horizontal', showMap: 'situational', @@ -1857,6 +1858,8 @@ const collectInventory = (state, data, prizeMap) => { state[`${dungeon.id}-compass`] = !!(compass & dungeon.mask); state[`${dungeon.id}-small-key`] = data[INV_ADDR.RANDO_KEY_START + dungeon.offset]; state[`${dungeon.id}-big-key`] = !!(bigKey & dungeon.mask); + state[`${dungeon.id}-checks-collected`] = + data[INV_ADDR.RANDO_CHECKS_START + dungeon.offset]; if (dungeon.prize) { const isCrystal = prizeMap[dungeon.offset].isCrystal; const prizeFlags = data[isCrystal ? INV_ADDR.CRYSTALS : INV_ADDR.PENDANTS]; @@ -1885,11 +1888,15 @@ const getDungeonAmounts = (config, state) => { DUNGEONS.forEach(dungeon => { let amount = 0; let total = dungeon.checks.length; - dungeon.checks.forEach(check => { - if (state[check]) { - ++amount; - } - }); + if (config.checkCalculation === 'inventory') { + amount = state[`${dungeon.id}-checks-collected`]; + } else { + dungeon.checks.forEach(check => { + if (state[check]) { + ++amount; + } + }); + } if (!config.wildMap && state[`${dungeon.id}-map`]) { --amount; --total;