| 2049 | } |
| 2050 | |
| 2051 | void StockpileSettingsSerializer::read_leather(color_ostream& out, DeserializeMode mode, const vector<string>& filters) { |
| 2052 | auto & pleather = mSettings->leather; |
| 2053 | read_category<StockpileSettings_LeatherSet>(out, "leather", mode, |
| 2054 | std::bind(&StockpileSettings::has_leather, mBuffer), |
| 2055 | std::bind(&StockpileSettings::leather, mBuffer), |
| 2056 | mSettings->flags.whole, |
| 2057 | mSettings->flags.mask_leather, |
| 2058 | [&]() { |
| 2059 | pleather.mats.clear(); |
| 2060 | pleather.color.clear(); |
| 2061 | pleather.dyed = false; |
| 2062 | pleather.undyed = false; |
| 2063 | }, |
| 2064 | [&](bool all, char val) { |
| 2065 | auto & bleather = mBuffer.leather(); |
| 2066 | |
| 2067 | unserialize_list_organic_mat(out, "", all, val, filters, |
| 2068 | [&](size_t idx) -> string { return bleather.mats(idx); }, |
| 2069 | bleather.mats_size(), pleather.mats, organic_mat_category::Leather); |
| 2070 | unserialize_list_color(out, "", all, val, filters, |
| 2071 | [&](size_t idx) -> string { return bleather.color(idx); }, |
| 2072 | bleather.color_size(), pleather.color); |
| 2073 | |
| 2074 | set_flag(out, "dyed", filters, all, val, bleather.dyed(), pleather.dyed); |
| 2075 | set_flag(out, "undyed", filters, all, val, bleather.undyed(), pleather.undyed); |
| 2076 | }); |
| 2077 | } |
| 2078 | |
| 2079 | bool StockpileSettingsSerializer::write_corpses(color_ostream& out, StockpileSettings::CorpsesSet* corpses) { |
| 2080 | return serialize_list_creature(out, |
nothing calls this directly
no test coverage detected