Merge remote-tracking branch 'Nilsolm/fix/autogems-binned-gems' into develop

develop
lethosor 2020-04-13 00:32:38 -04:00
commit 7e6d939085
2 changed files with 11 additions and 0 deletions

@ -40,6 +40,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences:
# Future # Future
## Fixes ## Fixes
- `autogems`: fixed an issue with binned gems being ignored in linked stockpiles
- `tweak` embark-profile-name: fixed handling of the native shift+space key - `tweak` embark-profile-name: fixed handling of the native shift+space key
## Misc Improvements ## Misc Improvements

@ -167,6 +167,16 @@ void create_jobs() {
stockpiled.insert(item->id); stockpiled.insert(item->id);
piled[item->getMaterialIndex()] += 1; piled[item->getMaterialIndex()] += 1;
} }
else if (item->flags.bits.container) {
std::vector<df::item*> binneditems;
Items::getContainedItems(item, &binneditems);
for (df::item *it : binneditems) {
if (valid_gem(it)) {
stockpiled.insert(it->id);
piled[it->getMaterialIndex()] += 1;
}
}
}
} }
// Decrement current jobs from all linked workshops, not just this one. // Decrement current jobs from all linked workshops, not just this one.