| 1452 | } |
| 1453 | |
| 1454 | void StockpileSettingsSerializer::read_coins(color_ostream& out, DeserializeMode mode, const vector<string>& filters) { |
| 1455 | auto & pcoins = mSettings->coins; |
| 1456 | read_category<StockpileSettings_CoinSet>(out, "coin", mode, |
| 1457 | std::bind(&StockpileSettings::has_coin, mBuffer), |
| 1458 | std::bind(&StockpileSettings::coin, mBuffer), |
| 1459 | mSettings->flags.whole, |
| 1460 | mSettings->flags.mask_coins, |
| 1461 | [&]() { |
| 1462 | pcoins.mats.clear(); |
| 1463 | }, |
| 1464 | [&](bool all, char val) { |
| 1465 | auto & bcoin = mBuffer.coin(); |
| 1466 | |
| 1467 | unserialize_list_material(out, "", all, val, filters, coins_mat_is_allowed, |
| 1468 | [&](const size_t& idx) -> const string& { return bcoin.mats(idx); }, |
| 1469 | bcoin.mats_size(), pcoins.mats); |
| 1470 | }); |
| 1471 | } |
| 1472 | |
| 1473 | static bool finished_goods_type_is_allowed(item_type::item_type type) { |
| 1474 | switch (type) { |
nothing calls this directly
no test coverage detected