aboutsummaryrefslogtreecommitdiff
path: root/features/waypoints
diff options
context:
space:
mode:
authorSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-08-24 07:19:17 +0800
committerSoopyboo32 <49228220+Soopyboo32@users.noreply.github.com>2022-08-24 07:19:17 +0800
commitd9aef53617d6baa98cfe926f94917e0e08e98084 (patch)
treef9084d0ffa80749577299fc9fe7098405679004e /features/waypoints
parent99f73cfc473294a8703450fff7acb5443d29a968 (diff)
downloadSoopyV2-d9aef53617d6baa98cfe926f94917e0e08e98084.tar.gz
SoopyV2-d9aef53617d6baa98cfe926f94917e0e08e98084.tar.bz2
SoopyV2-d9aef53617d6baa98cfe926f94917e0e08e98084.zip
add poiwder mining features (missing powder/h and lockpick help)
Diffstat (limited to 'features/waypoints')
-rw-r--r--features/waypoints/index.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/features/waypoints/index.js b/features/waypoints/index.js
index 85edc88..2a064b3 100644
--- a/features/waypoints/index.js
+++ b/features/waypoints/index.js
@@ -38,7 +38,12 @@ class Waypoints extends Feature {
this.loadWaypointsFromSendCoords = new ToggleSetting("Load waypoints from /patcher sendcoords messages", "Will dissapear after 1min", true, "load_waypoints_from_sendcoords", this)
this.mineWaypointsSetting = new ToggleSetting("CH waypoints", "Will sync between users", true, "minwaypoints", this)
- this.userWaypoints = JSON.parse(FileLib.read("soopyAddonsData", "soopyv2userwaypoints.json") || "{}")
+ try {
+ this.userWaypoints = JSON.parse(FileLib.read("soopyAddonsData", "soopyv2userwaypoints.json") || "{}")
+ } catch (e) {
+ ChatLib.chat(this.messagePrefix + "&cYour waypoints file corrupted and could not be read! Resetting to defaults.")
+ this.userWaypoints = {}
+ }
this.userWaypointsHash = {}
this.userWaypointsAll = []
this.lastArea = undefined