From 8fc13f59b30eb19be78aa2d1da4073459d1add1d Mon Sep 17 00:00:00 2001 From: Sapodilla Date: Thu, 8 Sep 2022 01:41:45 +0100 Subject: Added warp autocompletes also fixed ordering of setTabCompletions inside featureManager --- features/globalSettings/index.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'features/globalSettings/index.js') diff --git a/features/globalSettings/index.js b/features/globalSettings/index.js index e8b86ab..a1c6a3c 100644 --- a/features/globalSettings/index.js +++ b/features/globalSettings/index.js @@ -60,6 +60,7 @@ class GlobalSettings extends Feature { this.itemWorth = new ToggleSetting("(Approximate) Item worth in lore", "Accounts for stuff like enchants/recombs ect", false, "item_worth", this) this.showHecatomb = new ToggleSetting("Show hecatomb enchant info in lore", "", true, "show_hecatomb", this) this.showChampion = new ToggleSetting("Show champion enchant info in lore", "", true, "show_champion", this) + this.warpCompletions = new ToggleSetting("Autocomplete warp locations with tab", "", true, "show_champion", this) this.thunderBottle = new ToggleSetting("Thunder Bottle Progress Display", "shows you the progress of thunder bottle in your inventory", false, "thunder_bottle", this); this.thunderBottleElement = new HudTextElement() @@ -141,6 +142,18 @@ class GlobalSettings extends Feature { } }) + this.warps = JSON.parse(FileLib.read("SoopyV2", "features/globalSettings/warps.json")) + + this.registerCommand("warp", (...name) => { + //send command to server + ChatLib.command("warp " + (name[0] || "")); + }, (args) => { + if (this.warpCompletions.getValue()) + { + return this.warps.filter(v => v.toLowerCase().startsWith(args[0])) + } else return [] + }) + this.registerStep(true, 4, this.mobThings) this.firstPageSettings = [this.darkTheme] -- cgit From d93b1e169f4d1066397a6895834906386b8eea2f Mon Sep 17 00:00:00 2001 From: Sapodilla Date: Thu, 8 Sep 2022 05:18:37 +0100 Subject: Removed warp autocomplete toggle --- features/globalSettings/index.js | 4 ---- 1 file changed, 4 deletions(-) (limited to 'features/globalSettings/index.js') diff --git a/features/globalSettings/index.js b/features/globalSettings/index.js index a1c6a3c..9ffbd36 100644 --- a/features/globalSettings/index.js +++ b/features/globalSettings/index.js @@ -60,7 +60,6 @@ class GlobalSettings extends Feature { this.itemWorth = new ToggleSetting("(Approximate) Item worth in lore", "Accounts for stuff like enchants/recombs ect", false, "item_worth", this) this.showHecatomb = new ToggleSetting("Show hecatomb enchant info in lore", "", true, "show_hecatomb", this) this.showChampion = new ToggleSetting("Show champion enchant info in lore", "", true, "show_champion", this) - this.warpCompletions = new ToggleSetting("Autocomplete warp locations with tab", "", true, "show_champion", this) this.thunderBottle = new ToggleSetting("Thunder Bottle Progress Display", "shows you the progress of thunder bottle in your inventory", false, "thunder_bottle", this); this.thunderBottleElement = new HudTextElement() @@ -148,10 +147,7 @@ class GlobalSettings extends Feature { //send command to server ChatLib.command("warp " + (name[0] || "")); }, (args) => { - if (this.warpCompletions.getValue()) - { return this.warps.filter(v => v.toLowerCase().startsWith(args[0])) - } else return [] }) this.registerStep(true, 4, this.mobThings) -- cgit