summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Mrázek2012-08-03 16:09:51 +0200
committerPetr Mrázek2012-08-03 16:09:51 +0200
commit81ea0345ad8f9347ce6ef14bdd779ee1bef438a7 (patch)
tree5ff97407c24de6e916e0e3dea2dd6681287b47d6
parent61195859e3544e17cd702676e6b7b8015684622a (diff)
downloaddfhack-81ea0345ad8f9347ce6ef14bdd779ee1bef438a7.tar.gz
dfhack-81ea0345ad8f9347ce6ef14bdd779ee1bef438a7.tar.bz2
dfhack-81ea0345ad8f9347ce6ef14bdd779ee1bef438a7.tar.xz
Fix cage-related bug in the sort plugin.
m---------depends/clsocket0
-rw-r--r--plugins/sort.cpp7
m---------plugins/stonesense0
3 files changed, 6 insertions, 1 deletions
diff --git a/depends/clsocket b/depends/clsocket
-Subproject c85e9fb35d3510c5dcc367056cda3237d77a7ad
+Subproject d0b2d0750dc2d529a152eba4f3f519f69ff7eab
diff --git a/plugins/sort.cpp b/plugins/sort.cpp
index 5748a065..ff51fc77 100644
--- a/plugins/sort.cpp
+++ b/plugins/sort.cpp
@@ -431,12 +431,17 @@ DEFINE_SORT_HANDLER(unit_sorters, dwarfmode, "/QueryBuilding/Some/Assign", scree
sort_null_first(parameters);
PARSE_SPEC("units", parameters);
-
if (compute_order(*pout, L, top, &order, *ui_building_assign_units))
{
reorder_cursor(ui_building_item_cursor, order);
reorder_vector(ui_building_assign_type, order);
reorder_vector(ui_building_assign_units, order);
+ // this is for cages. cages need some extra sorting
+ if(ui_building_assign_items->size() == ui_building_assign_units->size())
+ {
+ reorder_vector(ui_building_assign_items, order);
+ reorder_vector(ui_building_assign_is_marked, order);
+ }
}
}
diff --git a/plugins/stonesense b/plugins/stonesense
-Subproject 17b653665567a5f1df628217820f76bb0b9c70a
+Subproject 5d4f06d785f8a9933679fe3caa12c18215e9674