quick check for type. this is intended to catch the case of newly empty storage item that happens to still be on the stockpile. we can do a more careful check (e.g. including item quality) if this isn't sufficient
| 478 | // that happens to still be on the stockpile. we can do a more careful check (e.g. including |
| 479 | // item quality) if this isn't sufficient |
| 480 | static bool non_accepted_storage_item(df::building_stockpilest *bld, df::item *item) { |
| 481 | auto & flags = bld->settings.flags; |
| 482 | if (item->getType() == df::item_type::BIN) |
| 483 | return !flags.bits.furniture || !bld->settings.furniture.type[df::furniture_type::BIN]; |
| 484 | if (item->hasToolUse(df::tool_uses::HEAVY_OBJECT_HAULING)) |
| 485 | return !flags.bits.furniture || !bld->settings.furniture.type[df::furniture_type::WHEELBARROW]; |
| 486 | if (item->isFoodStorage()) |
| 487 | return !flags.bits.furniture || !bld->settings.furniture.type[df::furniture_type::FOOD_STORAGE]; |
| 488 | return false; |
| 489 | } |
| 490 | |
| 491 | static void scan_stockpile(color_ostream &out, df::building_stockpilest *bld, |
| 492 | MeltStockProcessor &melt_stock_processor, |
no test coverage detected