From f2c127c0a7700d7f1c520acf97c4f1129945b79d Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Tue, 6 Apr 2021 18:19:51 -0400 Subject: [PATCH] compass work --- src/cheats/cheatEditArcology.js | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/src/cheats/cheatEditArcology.js b/src/cheats/cheatEditArcology.js index 1d1230e0400..59dd53f5a9c 100644 --- a/src/cheats/cheatEditArcology.js +++ b/src/cheats/cheatEditArcology.js @@ -10,10 +10,9 @@ App.UI.Cheat.arcology = function(num) { const options = new App.UI.OptionsGroup().enableDoubleColumn(); options.addOption("Name", "name", arc).showTextBox(); option = options.addOption("Direction", "direction", arc); + const compass = ["east", "north", "northeast", "northwest", "south", "southeast", "southwest", "west"]; if (num > 0) { - option.addValueList([ - "east", "north", "northeast", "northwest", "south", "southeast", "southwest", "west" - ]).pulldown(); + option.addValueList(compass).pulldown(); } options.addOption("government", "government", arc); if (num > 0) { @@ -31,24 +30,20 @@ App.UI.Cheat.arcology = function(num) { options.addOption("Demand factor", "demandFactor", arc).showTextBox(); options.addOption("Embargo", "embargo", arc).showTextBox(); options.addOption("Embargo target", "embargoTarget", arc) - .addValueList([ - "east", "north", "northeast", "northwest", "south", "southeast", "southwest", "west" - ]).pulldown(); + .addValue("none", -1).off() + .addValueList(compass).pulldown(); options.addOption("Influence target", "influenceTarget", arc) - .addValueList([ - "east", "north", "northeast", "northwest", "south", "southeast", "southwest", "west" - ]).pulldown(); + .addValue("none", -1).off() + .addValueList(compass).pulldown(); options.addOption("Influence bonus", "influenceBonus", arc).showTextBox(); options.addOption("Cyber economic", "CyberEconomic", arc).showTextBox(); options.addOption("Cyber economic target", "CyberEconomicTarget", arc) - .addValueList([ - "east", "north", "northeast", "northwest", "south", "southeast", "southwest", "west" - ]).pulldown(); + .addValue("none", -1).off() + .addValueList(compass).pulldown(); options.addOption("Cyber reputation", "CyberReputation", arc).showTextBox(); options.addOption("Cyber reputation target", "CyberReputationTarget", arc).showTextBox() - .addValueList([ - "east", "north", "northeast", "northwest", "south", "southeast", "southwest", "west" - ]).pulldown(); + .addValue("none", -1).off() + .addValueList(compass).pulldown(); options.addOption("Rival", "rival", arc).showTextBox(); if (arc.hasOwnProperty("hackingEconomic")) { // Sadly, hacking seems to be sometimes undefined, and .addOption will break atm if it is. options.addOption("Hacking economic", "hackingEconomic", arc).showTextBox(); -- GitLab