Page 1 of 1

expose a function to do the frontend resource patch calculations

Posted: Thu Aug 15, 2024 12:12 am
by ahicks
Pretty much what it says. At runtime a mod can't easily find out about a whole patch of resources save to do the calculations in lua, as far as I can tell. We'd like to do this calculation efficiently, which probably means C++ given that Lua isn't so great at data structures.

We are aware that the engine probably doesn't have a concept of patch at runtime and that probably the heuristic can go wrong when e.g. mods do strange things to maps. For our use case, being a heuristic is perfectly fine.

Also, as a short-term solution exposing resource_patch_search_radius would be nice. I'm about to smuggle those across with hacks. Doesn't seem worth a small API request for that when I'm making the big one, though I suppose if this can't be done in general I may make a small one for that.