makeSquad, updateRoomAssignments
Both of these functions are absolutely hideously complicated to implement correctly and required a lot of reverse engineering, and I thought they might well be useful to have generally. I've tested makeSquad a fair amount in 50.xx and it seems to work, updateRoomAssignments is a lot more straightforward to test and I've bashed on it a lot. Both of these are unimplementable from lua, because of memory allocation
These functions take IDs currently but I've noticed that a lot of the rest of the API takes raw values so that probably wants to change? And the sorts below could probably be changed to a sorted insert, as the sorting is necessary
Other than that: the main question is is this something generally that you'd want in dfhack core? I imagine it'll need reworking a fair bit, but I'm happy to make it happen because I'm hoping to shrink the size of my fork for the ui replacement to just imgui
I already merged #2684, but could you tack on a changelog entry for that PR here? in the API section for c++ and Lua for Lua
ping on this
I should have some free time to finish this up fairly soon, sorry for the long delay!
Cleaned up a bunch more of the PR. The only major code-wise unanswered question as far as I can tell is what uniform_priority is doing there
I also need to check what's going on with sorting squad->rooms and zone->squad_room_info, I can't remember if I had a good reason when I wrote this for not using sorted insert
Edit: Ah well my original pr message says no, so I'll fix that too