From d9aef53617d6baa98cfe926f94917e0e08e98084 Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Wed, 24 Aug 2022 07:19:17 +0800 Subject: add poiwder mining features (missing powder/h and lockpick help) --- features/waypoints/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'features/waypoints') 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 -- cgit