autogems: check bin content in linked stockpiles

develop
Nilsolm 2020-04-12 11:02:26 +02:00
parent 3f72d9934e
commit 362e49c0bc
1 changed files with 10 additions and 0 deletions

@ -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.