diff --git a/docs/changelog.txt b/docs/changelog.txt index e078c870da..aeec3aa2eb 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -71,6 +71,7 @@ Template for new versions: - `aquifer`: make ``--skip-top`` and top-relative ``--levels`` take effect for the ``drain``, ``convert``, and ``add`` actions instead of being silently ignored - `autodump`: ``destroy`` no longer leaves the contents of destroyed containers in limbo or crashes when destroying unit-held items - `buildingplan`: fix "Unlink all" only unlinking some mechanisms (or crashing) when freeing mechanisms from the building +- `sort`: fix the Places/Workshops and task searches missing workshops by their current display names (e.g. "Stoneworker's Workshop", "Screw Press") - `timestream`: deal properly with units who have breathing difficulties - `stocks`: overlay now resets scroll position when collapsing categories so the item list is no longer left blank and unscrollable diff --git a/plugins/lua/sort/info.lua b/plugins/lua/sort/info.lua index 4f0462dfb7..413b51f249 100644 --- a/plugins/lua/sort/info.lua +++ b/plugins/lua/sort/info.lua @@ -29,6 +29,10 @@ local function get_task_search_key(cri_unit) table.insert(result, bld.name) local btype = bld:getType() if btype == df.building_type.Workshop then + -- the display name may differ from the enum item name (e.g. + -- Masons -> "Stoneworker's Workshop") and is the raw-defined + -- name for custom workshops + table.insert(result, dfhack.buildings.getName(bld)) table.insert(result, df.workshop_type.attrs[bld.type].name or '') table.insert(result, df.workshop_type[bld.type]) elseif btype == df.building_type.Furnace then diff --git a/plugins/lua/sort/places.lua b/plugins/lua/sort/places.lua index c353d5a948..2b42be60c3 100644 --- a/plugins/lua/sort/places.lua +++ b/plugins/lua/sort/places.lua @@ -153,6 +153,12 @@ local function get_workshop_search_key(workshop) end table.insert(result, workshop.name) + + -- the display name may differ from the enum item name (e.g. Masons -> + -- "Stoneworker's Workshop") and is the raw-defined name for custom + -- workshops + table.insert(result, dfhack.buildings.getName(workshop)) + table.insert(result, df.workshop_type.attrs[workshop.type].name or '') table.insert(result, df.workshop_type[workshop.type])