aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-09-18 21:29:52 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-09-18 21:29:52 +0800
commit420779f515ca2df3cde7b8f6f383f9ead8e127a6 (patch)
treea19be2bdb5474a30d3087396b5775548deca97e0 /src
parent7cece8c872a744fc23be029510bd0a9dfd168c25 (diff)
downloadSoopyV2-420779f515ca2df3cde7b8f6f383f9ead8e127a6.tar.gz
SoopyV2-420779f515ca2df3cde7b8f6f383f9ead8e127a6.tar.bz2
SoopyV2-420779f515ca2df3cde7b8f6f383f9ead8e127a6.zip
+ swap promises to use arrow function for correct 'this' context
Diffstat (limited to 'src')
-rw-r--r--src/features/waypoints/index.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/features/waypoints/index.js b/src/features/waypoints/index.js
index 9188ddf..15843b5 100644
--- a/src/features/waypoints/index.js
+++ b/src/features/waypoints/index.js
@@ -153,6 +153,11 @@ class Waypoints extends Feature {
console.log(e.stack)
}
})
+ this.registerCommand("clearorderedwaypoints", () => {
+ this.currentOrderedWaypointIndex = -1
+ this.orderedWaypoints.clear()
+ if (this.showInfoInChat.getValue()) ChatLib.chat(this.FeatureManager.messagePrefix + "Cleared waypoints!")
+ })
this.registerCommand("setorderwaypointindex", (ind) => {
this.currentOrderedWaypointIndex = parseInt(ind)
if (this.showInfoInChat.getValue()) ChatLib.chat(this.FeatureManager.messagePrefix + "Set index to " + ind + "!")
@@ -353,6 +358,7 @@ class Waypoints extends Feature {
this.registerEvent("worldLoad", () => {
this.locations = {}
+ if (this.currentOrderedWaypointIndex >= 0) this.currentOrderedWaypointIndex = 0
})
}