blish-hud / Pathing

[Module] The official pathing module which adds marker and trail support to Blish HUD.
https://blishhud.com/docs/markers/
MIT License
13 stars 11 forks source link

[Enhancement] Map-Data Cache #92

Closed chland closed 2 months ago

chland commented 1 year ago

I haven't looked at the code and the last time i messed with map-rendering was years ago... but i guess the Pathing module only needs the map_rect and continent_rect data to render the markers on the (mini-)map - so wouldn't it make sense to cache this data locally? This way, API outages wouldn't affect the marker-rendering on the maps.

You could basically just store the neccessary data (map-id, map_rect, continent_rect) in a CSV/JSON file whenever you read it from the API (for example when a user enters a new map) and fall back to this file if the API isn't available. And by shipping a base CSV/JSON file with all current map-data you could even ensure that it would even work if the API is down and the player enters a map he never visited before.

dlamkins commented 2 months ago

This is now fixed in the latest version of the module. Thanks. 👍