| 1508 | } |
| 1509 | |
| 1510 | bool StockpileSettingsSerializer::write_finished_goods(color_ostream& out, StockpileSettings::FinishedGoodsSet* finished_goods) { |
| 1511 | bool all = mSettings->finished_goods.dyed && mSettings->finished_goods.undyed; |
| 1512 | finished_goods->set_dyed(mSettings->finished_goods.dyed); |
| 1513 | finished_goods->set_undyed(mSettings->finished_goods.undyed); |
| 1514 | |
| 1515 | all = serialize_list_item_type(out, |
| 1516 | finished_goods_type_is_allowed, |
| 1517 | [&](const string& token) { finished_goods->add_type(token); }, |
| 1518 | mSettings->finished_goods.type) && all; |
| 1519 | |
| 1520 | all = serialize_list_material(out, |
| 1521 | finished_goods_mat_is_allowed, |
| 1522 | [&](const string& token) { finished_goods->add_mats(token); }, |
| 1523 | mSettings->finished_goods.mats) && all; |
| 1524 | |
| 1525 | all = serialize_list_other_mats(out, |
| 1526 | mOtherMatsFinishedGoods.mats, [&](const string& token) { finished_goods->add_other_mats(token); }, |
| 1527 | mSettings->finished_goods.other_mats) && all; |
| 1528 | |
| 1529 | all = serialize_list_quality(out, |
| 1530 | [&](const string& token) { finished_goods->add_quality_core(token); }, |
| 1531 | mSettings->finished_goods.quality_core) && all; |
| 1532 | |
| 1533 | all = serialize_list_quality(out, |
| 1534 | [&](const string& token) { finished_goods->add_quality_total(token); }, |
| 1535 | mSettings->finished_goods.quality_total) && all; |
| 1536 | |
| 1537 | all = serialize_list_color(out, |
| 1538 | [&](const string& token) { finished_goods->add_color(token); }, |
| 1539 | &mSettings->finished_goods.color) && all; |
| 1540 | |
| 1541 | return all; |
| 1542 | } |
| 1543 | |
| 1544 | void StockpileSettingsSerializer::read_finished_goods(color_ostream& out, DeserializeMode mode, const vector<string>& filters) { |
| 1545 | auto & pfinished_goods = mSettings->finished_goods; |
nothing calls this directly
no test coverage detected