Skip to content

Commit 4bc18f6

Browse files
committed
0.93.2
1 parent 45786f6 commit 4bc18f6

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## Version 0.93.2
4+
5+
- Minor updates, adjustments, and style improvements
6+
37
## Version 0.93.1
48

59
- Minor updates, adjustments, and style improvements

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mousehunt-improved",
3-
"version": "0.93.1",
3+
"version": "0.93.2",
44
"description": "Improve your MouseHunt experience.",
55
"author": "Brad Parbs <brad@bradparbs.com> (https://bradparbs.com/)",
66
"license": "MIT",

src/modules/better-maps/index.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ const initMapper = (map) => {
226226
};
227227

228228
let parentShowMap;
229+
let defaultMapId;
229230
/**
230231
* Intercept the map request from the controller.
231232
*/
@@ -238,21 +239,23 @@ const intercept = () => {
238239
hg.controllers.TreasureMapController.showMap = async (id = false) => {
239240
parentShowMap(id);
240241

241-
const intercepted = await interceptMapRequest(id ?? user?.quests?.QuestRelicHunter?.default_map_id);
242+
const intercepted = await interceptMapRequest(id || defaultMapId);
242243
setTimeout(() => {
243244
if (! intercepted) {
244-
interceptMapRequest(id ?? user?.quests?.QuestRelicHunter?.default_map_id);
245+
interceptMapRequest(id || defaultMapId);
245246
}
246247
}, 1000);
247248
};
248249

249250
onRequest('users/treasuremap_v2.php', async (data) => {
251+
hg.controllers.TreasureMapController.clearMapCache();
250252
if (data.treasure_map && data.treasure_map.map_id) {
251253
await setMapData(data.treasure_map.map_id, data.treasure_map);
252254
}
253255
}, true);
254256

255257
onRequest('board/board.php', async (data) => {
258+
hg.controllers.TreasureMapController.clearMapCache();
256259
if (data.treasure_map && data.treasure_map.map_id) {
257260
await setMapData(data.treasure_map.map_id, data.treasure_map);
258261
}
@@ -520,6 +523,11 @@ const init = () => {
520523
onEvent('map_show_map_preview', addMapClassesToPreview);
521524
onEvent('map_hide_map_preview', removeMapClassesFromPreview);
522525

526+
defaultMapId = user?.quests?.QuestRelicHunter?.default_map_id;
527+
onRequest('*', () => {
528+
defaultMapId = user?.quests?.QuestRelicHunter?.default_map_id;
529+
}, true);
530+
523531
onRequest('users/treasuremap_v2.php', () => {
524532
runMapEnhancements();
525533
setTimeout(runMapEnhancements, 750);

0 commit comments

Comments
 (0)