Wrinkler button disappear when not active

This commit is contained in:
Daniël van Noord
2021-03-26 16:26:57 +01:00
parent 48c3bad336
commit fe8749e7b2
6 changed files with 9 additions and 4 deletions

View File

@@ -5,7 +5,7 @@ import { CMOptions } from '../VariablesAndData';
* It is called by changes in CM.Options.WrinklerButtons
*/
export default function ToggleWrinklerButtons() {
if (CMOptions.WrinklerButtons) {
if (CMOptions.WrinklerButtons && Game.elderWrath) {
l('PopAllNormalWrinklerButton').style.display = '';
l('PopFattestWrinklerButton').style.display = '';
} else {

View File

@@ -1,3 +1,4 @@
import ToggleWrinklerButtons from '../Config/Toggles/ToggleWrinklerButtons';
import { CMOptions } from '../Config/VariablesAndData';
import { Beautify } from './BeautifyAndFormatting/BeautifyFormatting';
import UpdateBuildings from './BuildingsUpgrades/Buildings';
@@ -52,6 +53,9 @@ export default function Draw() {
// Change menu refresh interval
RefreshMenu();
// Update display of wrinkler buttons, this checks if Elder Pledge has been bought and if they should be disabled
ToggleWrinklerButtons();
// Replace Cookies counter because Orteil uses very weird code to "pad" it...
if (CMOptions.Scale) {
let str = l('cookies').innerHTML.replace(

View File

@@ -59,6 +59,7 @@ export default function InitializeCookieMonster() {
Game.CalculateGains();
LoadConfig(); // Must be after all things are created!
Game.UpdateMenu();
CMLastAscendState = Game.OnAscend;
if (Game.prefs.popups)