diff options
Diffstat (limited to 'features/globalSettings/index.js')
-rw-r--r-- | features/globalSettings/index.js | 13 |
1 files changed, 13 insertions, 0 deletions
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] |