MCPcopy Create free account
hub / github.com/DFHack/dfhack / read_coins

Method read_coins

plugins/stockpiles/StockpileSerializer.cpp:1454–1471  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1452}
1453
1454void 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
1473static bool finished_goods_type_is_allowed(item_type::item_type type) {
1474 switch (type) {

Callers

nothing calls this directly

Calls 2

clearMethod · 0.45

Tested by

no test coverage detected