From 6749edf080e4a28c42d7bff0075d19c32b0dd181 Mon Sep 17 00:00:00 2001 From: Braeden Date: Sun, 27 Oct 2024 17:52:21 -0400 Subject: [PATCH] feat: Universal Milestone Popup Toggle --- js/technical/systemComponents.js | 3 +++ js/utils.js | 2 +- js/utils/options.js | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/js/technical/systemComponents.js b/js/technical/systemComponents.js index fcc77c8..9daa1b4 100644 --- a/js/technical/systemComponents.js +++ b/js/technical/systemComponents.js @@ -171,6 +171,9 @@ var systemComponents = { + + + ` }, diff --git a/js/utils.js b/js/utils.js index f56ca9c..59ed1d7 100644 --- a/js/utils.js +++ b/js/utils.js @@ -261,7 +261,7 @@ function updateMilestones(layer) { if (!(hasMilestone(layer, id)) && layers[layer].milestones[id].done()) { player[layer].milestones.push(id) if (layers[layer].milestones[id].onComplete) layers[layer].milestones[id].onComplete() - if (tmp[layer].milestonePopups || tmp[layer].milestonePopups === undefined) doPopup("milestone", tmp[layer].milestones[id].requirementDescription, "Milestone Gotten!", 3, tmp[layer].color); + if ((tmp[layer].milestonePopups || tmp[layer].milestonePopups === undefined) && !options.hideMilestonePopups) doPopup("milestone", tmp[layer].milestones[id].requirementDescription, "Milestone Gotten!", 3, tmp[layer].color); player[layer].lastMilestone = id } } diff --git a/js/utils/options.js b/js/utils/options.js index fa575a9..dcb0a52 100644 --- a/js/utils/options.js +++ b/js/utils/options.js @@ -14,6 +14,7 @@ function getStartOptions() { forceOneTab: false, oldStyle: false, tooltipForcing: true, + hideMilestonePopups: false, } } @@ -76,3 +77,5 @@ function milestoneShown(layer, id) { } return false; } + +let formatOption = (opt) => opt ? 'ON' : 'OFF'