diff --git a/src/cheats/mod_EditArcologyCheat.tw b/src/cheats/mod_EditArcologyCheat.tw index e18c731096b81bc21181e20e269ba3a1e123b75c..0c9c2221bd9a2a691b9896bea3aff52d1ced78f5 100644 --- a/src/cheats/mod_EditArcologyCheat.tw +++ b/src/cheats/mod_EditArcologyCheat.tw @@ -10,15 +10,8 @@ <<includeDOM App.Intro.economy()>> -<br>Arcology sex slaves: <<print num($NPCSlaves)>> -<<textbox "$NPCSlaves" $NPCSlaves>> <br>Arcology prosperity: $arcologies[0].prosperity <<textbox "$arcologies[0].prosperity" $arcologies[0].prosperity>> -<br>Arcology prosperity cap: $AProsperityCap -<<textbox "$AProsperityCap" $AProsperityCap>> - -<br><br>Shelter Abuse Counter: $shelterAbuse -<<textbox "$shelterAbuse" $shelterAbuse>> <br><br>__Arcologies:__ <br> __''$arcologies[0].name''__ is your arcology. diff --git a/src/cheats/playerArcCheats.js b/src/cheats/playerArcCheats.js deleted file mode 100644 index 2ddaebe40021ecda23b642067e89f8cfb42ac174..0000000000000000000000000000000000000000 --- a/src/cheats/playerArcCheats.js +++ /dev/null @@ -1,27 +0,0 @@ -App.UI.Cheat.schools = function() { - const el = new DocumentFragment(); - const options = new App.UI.OptionsGroup(); - options.addCustom(App.UI.DOM.makeElement("h2", "Schools")); - for (const [key, obj] of App.Data.misc.schools) { - if (typeof obj.requirements === "function" && !obj.requirements()) { - continue; - } - options.addCustom(App.UI.DOM.makeElement("h3", obj.title)); - options.addOption("Students Bought", "studentsBought", V[key]).showTextBox(); - options.addOption("Upgrades", "schoolUpgrade", V[key]) - .addValueList([ - ["None", 0], - ["Partial", 1], - ["Full", 2], - ]); - options.addOption("Moved to arcology", "schoolPresent", V[key]) - .addValue("No", 0).off() - .addValue("Yes", 1).on(); - options.addOption("Prosperity", "schoolProsperity", V[key]).showTextBox(); - options.addOption("Failed", "schoolAnnexed", V[key]) - .addValue("No", 0).off() - .addValue("Yes", 1).on(); - } - el.append(options.render()); - return el; -}; diff --git a/src/gui/options/options.js b/src/gui/options/options.js index 0bd5b0284c9a9dd126f36611c07d6b16605b4593..19f9bcbdf95420812e99a8bfda0ca65a148410e9 100644 --- a/src/gui/options/options.js +++ b/src/gui/options/options.js @@ -14,7 +14,8 @@ App.UI.optionsPassage = function() { tabBar.addTab("Mods", "mods", mods()); tabBar.addTab("Debug & cheating", "debug-cheating", debugCheating()); if (V.cheatMode) { - tabBar.addTab("Cheat edit schools", "cheat-school", App.UI.Cheat.schools()); + tabBar.addTab("Cheats", "cheat", cheat()); + tabBar.addTab("Cheat edit schools", "cheat-school", cheatSchools()); } tabBar.addTab("Experimental", "experimental", experimental()); el.append(tabBar.render()); @@ -446,6 +447,44 @@ App.UI.optionsPassage = function() { } } + function cheat() { + const el = new DocumentFragment(); + const options = new App.UI.OptionsGroup(); + options.addOption("Arcology sex slaves", "NPCSlaves").showTextBox(); + options.addOption("Arcology prosperity cap", "AProsperityCap").showTextBox(); + options.addOption("Shelter Abuse Counter", "shelterAbuse").showTextBox(); + el.append(options.render()); + return el; + } + + function cheatSchools() { + const el = new DocumentFragment(); + const options = new App.UI.OptionsGroup(); + options.addCustom(App.UI.DOM.makeElement("h2", "Schools")); + for (const [key, obj] of App.Data.misc.schools) { + if (typeof obj.requirements === "function" && !obj.requirements()) { + continue; + } + options.addCustom(App.UI.DOM.makeElement("h3", obj.title)); + options.addOption("Students Bought", "studentsBought", V[key]).showTextBox(); + options.addOption("Upgrades", "schoolUpgrade", V[key]) + .addValueList([ + ["None", 0], + ["Partial", 1], + ["Full", 2], + ]); + options.addOption("Moved to arcology", "schoolPresent", V[key]) + .addValue("No", 0).off() + .addValue("Yes", 1).on(); + options.addOption("Prosperity", "schoolProsperity", V[key]).showTextBox(); + options.addOption("Failed", "schoolAnnexed", V[key]) + .addValue("No", 0).off() + .addValue("Yes", 1).on(); + } + el.append(options.render()); + return el; + } + function debugCheating() { const el = new DocumentFragment(); let options;