diff options
author | Ninjune <enderknight537@gmail.com> | 2022-12-22 03:21:02 -0600 |
---|---|---|
committer | Ninjune <enderknight537@gmail.com> | 2022-12-22 03:21:02 -0600 |
commit | 329dccf50ed5e9f87531580f679522238b6a019b (patch) | |
tree | 3053852d322db744822a7dd2a05fd59d2b1e90b7 /render/naturals.js | |
parent | 1ffc0a89be42fcde95a04a87cc00dbc347b27ece (diff) | |
download | coleweight-329dccf50ed5e9f87531580f679522238b6a019b.tar.gz coleweight-329dccf50ed5e9f87531580f679522238b6a019b.tar.bz2 coleweight-329dccf50ed5e9f87531580f679522238b6a019b.zip |
v1.8.3
Diffstat (limited to 'render/naturals.js')
-rw-r--r-- | render/naturals.js | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/render/naturals.js b/render/naturals.js index 2f9adc9..2591fb0 100644 --- a/render/naturals.js +++ b/render/naturals.js @@ -6,17 +6,11 @@ let coords = [], visibleCoords = [] register("gameLoad", res => { - axios.get(`https://ninjune.dev/api/coords`) - .then((res) => { - coords = res.data - }) - .catch((err) => { - if(settings.debug) return console.log(err) - }) + coords = JSON.parse(FileLib.read("Coleweight", "data/naturalCoords.json")) }) register("step", () => { - if(constants.serverData.map != "Crystal Hollows" || !settings.showNaturals) return + if(constants.serverData.map != "Crystal Hollows" || !settings.showNaturals || coords.length < 1) return visibleCoords = [] coords.filter(coord => (((-1 * settings.naturalRange)/2 < (parseInt(Player.getX()) - coord.x)) && ((parseInt(Player.getX()) - coord.x) < settings.naturalRange/2) |