-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathperfectIdling.CheatmenuPlugin.js
More file actions
37 lines (34 loc) · 1.54 KB
/
perfectIdling.CheatmenuPlugin.js
File metadata and controls
37 lines (34 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/**
* Perfect Idling Plugin for Cheat Menu
*
* Adds buttons to toggle the Perfect idling achievement.
*
* Load this file and then load Cheat Menu
*/
if (typeof CheatPlugins !== 'object') CheatPlugins = {};
CheatPlugins['perfectIdling'] = {
Actions: { // Only ran when we call them
perfectIdlingActivate: ()=>{
let upgrade = Game.Upgrades['Perfect idling'];
upgrade.unlocked = 1;
upgrade.bought = 1;
Game.upgradesToRebuild = 1;
Cheat.Game.UpdateMenu();
},
perfectIdlingDeactivate: ()=>{
let upgrade = Game.Upgrades['Perfect idling'];
upgrade.unlocked = 0;
upgrade.bought = 0;
Game.upgradesToRebuild = 1;
Cheat.Game.UpdateMenu();
},
},
Game: { // Ran when Cheat Menu runs them
UpdateMenu: (fragment) => {
fragment.appendChild(Cheat.Menu.subheading('Crustulum: Perfect Idling'));
if (Game.Has('Perfect idling')) fragment.appendChild(Cheat.Menu.actionButton('perfectIdlingDeactivate','Deactivate Perfect Idling','Toggles perfect idling which makes cookies generate while the game is closed.', Cheat.Plugins['perfectIdling'].Actions.perfectIdlingDeactivate));
else fragment.appendChild(Cheat.Menu.actionButton('perfectIdlingActivate','Activate Perfect Idling','Toggles perfect idling which makes cookies generate while the game is closed.', Cheat.Plugins['perfectIdling'].Actions.perfectIdlingActivate));
},
},
};
/* cSpell:ignore Cheat, Achiev */