Skip to content

Commit 3ca9c7e

Browse files
committed
Reword sortbuildings to enableSort
1 parent c1890b3 commit 3ca9c7e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

main.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ let BestDealHelper = {
6767
name: "BestDealHelper",
6868

6969
config: {
70-
sortbuildings: 0,
70+
enableSort: 0,
7171
},
7272

7373
isLoaded: false,
@@ -88,7 +88,7 @@ let BestDealHelper = {
8888
Game.customOptionsMenu.push(MOD.addOptionsMenu);
8989
MOD.last_cps = 0;
9090
MOD.last_buildings_order = [...Game.ObjectsById].map(e => e.id);
91-
MOD.last_config_sortbuildings = MOD.config.sortbuildings;
91+
MOD.last_config_enableSort = MOD.config.enableSort;
9292
setTimeout(function () {
9393
setInterval(MOD.logicLoop, 200);
9494
}, 500);
@@ -116,7 +116,7 @@ let BestDealHelper = {
116116
addOptionsMenu: function () {
117117
const body = `
118118
<div class="listing">
119-
${MOD.button("sortbuildings", "Sort Buildings ON (default)", "Sort Buildings OFF")}
119+
${MOD.button("enableSort", "Sort ON (default)", "Sort OFF")}
120120
</div>`;
121121

122122
CCSE.AppendCollapsibleOptionsMenu(MOD.name, body);
@@ -126,11 +126,11 @@ let BestDealHelper = {
126126
MOD.loopCount++;
127127
if (MOD.loopCount >= 10
128128
|| MOD.last_cps !== Game.cookiesPs
129-
|| MOD.config.sortbuildings !== MOD.last_config_sortbuildings
129+
|| MOD.config.enableSort !== MOD.last_config_enableSort
130130
|| !document.querySelector("#productAcc0")
131131
|| (document.querySelector("#upgrade0") && !document.querySelector("#upgradeAcc0"))) {
132132
MOD.sortDeals();
133-
MOD.last_config_sortbuildings = MOD.config.sortbuildings;
133+
MOD.last_config_enableSort = MOD.config.enableSort;
134134
MOD.last_cps = Game.cookiesPs;
135135
MOD.loopCount = 0;
136136
}
@@ -357,7 +357,7 @@ let BestDealHelper = {
357357

358358

359359
// Sort upgrades & buildings (or leave them as default)
360-
if (MOD.config.sortbuildings) {
360+
if (MOD.config.enableSort) {
361361
upgrades.sort(function (a, b) {
362362
if (b.BestHelper !== a.BestHelper) {
363363
return b.BestHelper - a.BestHelper;

0 commit comments

Comments
 (0)