Merge pull request #353 from eswald/autotrade-bugfix

Autotrade bugfix: Mark All now unmarks bin contents.
develop
expwnent 2014-11-02 03:33:28 -05:00
commit 82fb533176
2 changed files with 8 additions and 2 deletions

@ -2,6 +2,9 @@ DFHack future
Fixes: Fixes:
- replaced drainaquifer.rb with a faster less buggy drain-aquifer.lua - replaced drainaquifer.rb with a faster less buggy drain-aquifer.lua
Fixes:
- autotrade: "Mark all" no longer double-marks bin contents
DFHack 0.40.13-r1 DFHack 0.40.13-r1
Internals: Internals:
- unified spatter structs - unified spatter structs

@ -455,7 +455,9 @@ struct tradeview_hook : public df::viewscreen_tradegoodsst
{ {
for (int i = 0; i < trader_selected.size(); i++) for (int i = 0; i < trader_selected.size(); i++)
{ {
trader_selected[i] = 1; // Only mark containers, not their contents.
// Granted, this behaves poorly with the search plugin...
trader_selected[i] = !trader_items[i]->flags.bits.in_inventory;
} }
} }
else if (input->count(interface_key::CUSTOM_U)) else if (input->count(interface_key::CUSTOM_U))
@ -469,7 +471,8 @@ struct tradeview_hook : public df::viewscreen_tradegoodsst
{ {
for (int i = 0; i < broker_selected.size(); i++) for (int i = 0; i < broker_selected.size(); i++)
{ {
broker_selected[i] = 1; // Only mark containers, not their contents.
broker_selected[i] = !broker_items[i]->flags.bits.in_inventory;
} }
} }
else if (input->count(interface_key::CUSTOM_SHIFT_U)) else if (input->count(interface_key::CUSTOM_SHIFT_U))