diff --git a/src/js/commandline-lists.js b/src/js/commandline-lists.js index ae7fecce7..5a05006de 100644 --- a/src/js/commandline-lists.js +++ b/src/js/commandline-lists.js @@ -1294,7 +1294,7 @@ let commandsCopyWordsToClipboard = { }; let commandsMonkeyPowerLevel = { - title: "You control the power", + title: "Power mode...", list: [ { id: "monkeyPowerLevelOff", @@ -1302,24 +1302,24 @@ let commandsMonkeyPowerLevel = { exec: () => UpdateConfig.setMonkeyPowerLevel("off"), }, { - id: "monkeyPowerLevelMellow", - display: "mellow", - exec: () => UpdateConfig.setMonkeyPowerLevel("mellow"), + id: "monkeyPowerLevel1", + display: "1", + exec: () => UpdateConfig.setMonkeyPowerLevel("1"), }, { - id: "monkeyPowerLevelHigh", - display: "high", - exec: () => UpdateConfig.setMonkeyPowerLevel("high"), + id: "monkeyPowerLevel2", + display: "2", + exec: () => UpdateConfig.setMonkeyPowerLevel("2"), }, { - id: "monkeyPowerLevelUltra", - display: "ultra", - exec: () => UpdateConfig.setMonkeyPowerLevel("ultra"), + id: "monkeyPowerLevel3", + display: "3", + exec: () => UpdateConfig.setMonkeyPowerLevel("3"), }, { - id: "monkeyPowerLevelOver9000", - display: "over 9000", - exec: () => UpdateConfig.setMonkeyPowerLevel(">9000"), + id: "monkeyPowerLevel4", + display: "4", + exec: () => UpdateConfig.setMonkeyPowerLevel("4"), }, ], }; @@ -2066,28 +2066,9 @@ export let defaultCommands = { exec: (input) => {}, }, { - id: "unlockMonkeyPower", - display: "Unlock the MONKEY POWER!!", - alias: "monkeypower", - available: () => !Config.monkeyPowerUnlocked, - exec: () => { - UpdateConfig.setMonkeyPowerUnlocked(true); - }, - }, - { - id: "lockMonkeyPower", - display: "Lock away the Monkey Power.. Its to much!", - alias: "monkeypower", - available: () => Config.monkeyPowerUnlocked, - exec: () => { - UpdateConfig.setMonkeyPowerUnlocked(false); - }, - }, - { - id: "monkeyPowerLevel", - display: "Is the monkey power to much? You can tone it down.", - alias: "monkeypwrlvl", - available: () => Config.monkeyPowerUnlocked, + id: "monkeyPower", + display: "Power mode...", + alias: "powermode", subgroup: true, exec: () => { current.push(commandsMonkeyPowerLevel); diff --git a/src/js/config.js b/src/js/config.js index 996f8bfac..c00632062 100644 --- a/src/js/config.js +++ b/src/js/config.js @@ -121,8 +121,7 @@ let defaultConfig = { customBackgroundSize: "cover", customBackgroundFilter: [0, 1, 1, 1, 1], customLayoutfluid: "qwerty#dvorak#colemak", - monkeyPowerUnlocked: false, - monkeyPowerLevel: ">9000", + monkeyPowerLevel: "off", }; function isConfigKeyValid(name) { @@ -1486,19 +1485,11 @@ export function setCustomBackgroundFilter(array, nosave) { } export function setMonkeyPowerLevel(level, nosave) { - if (!["off", "mellow", "high", "ultra", ">9000"].includes(level)) - level = "off"; + if (!["off", "1", "2", "3", "4"].includes(level)) level = "off"; config.monkeyPowerLevel = level; if (!nosave) saveToLocalStorage(); } -export function setMonkeyPowerUnlocked(val, nosave) { - if (val !== true) val = false; - config.monkeyPowerUnlocked = val; - if (val) setMonkeyPowerLevel(">9000"); - if (!nosave) saveToLocalStorage(); -} - export function apply(configObj) { if (configObj == null || configObj == undefined) { Notifications.add("Could not apply config", -1, 3); @@ -1583,7 +1574,6 @@ export function apply(configObj) { setMode(configObj.mode, true); setMonkey(configObj.monkey, true); setRepeatQuotes(configObj.repeatQuotes, true); - setMonkeyPowerUnlocked(configObj.monkeyPowerUnlocked, true); setMonkeyPowerLevel(configObj.monkeyPowerLevel, true); LanguagePicker.setActiveGroup(); diff --git a/src/js/monkey-power.js b/src/js/monkey-power.js index ba93f1b77..808e2b25f 100644 --- a/src/js/monkey-power.js +++ b/src/js/monkey-power.js @@ -176,15 +176,10 @@ function randomColor() { * @param {boolean} good Good power or not? */ export function addPower(good = true, extra = false) { - if ( - !TestLogic.active || - !Config.monkeyPowerUnlocked || - Config.monkeyPowerLevel === "off" - ) - return; + if (!TestLogic.active || Config.monkeyPowerLevel === "off") return; // Shake - if (["ultra", ">9000"].includes(Config.monkeyPowerLevel)) { + if (["3", "4"].includes(Config.monkeyPowerLevel)) { $("html").css("overflow", "hidden"); const shake = [ Math.round(shakeAmount - Math.random() * shakeAmount), @@ -210,7 +205,7 @@ export function addPower(good = true, extra = false) { i > 0; i-- ) { - const color = ["high", ">9000"].includes(Config.monkeyPowerLevel) + const color = ["2", "4"].includes(Config.monkeyPowerLevel) ? randomColor() : good ? ThemeColors.caret