| 731 | } |
| 732 | |
| 733 | static int logistics_getStockpileConfigs(lua_State *L) { |
| 734 | color_ostream *out = Lua::GetOutput(L); |
| 735 | if (!out) |
| 736 | out = &Core::getInstance().getConsole(); |
| 737 | DEBUG(control, *out).print("entering logistics_getStockpileConfigs\n"); |
| 738 | |
| 739 | unordered_map<df::building_stockpilest*, PersistentDataItem> cache; |
| 740 | validate_stockpile_configs(*out, cache); |
| 741 | |
| 742 | vector<df::building_stockpilest*> sps; |
| 743 | find_stockpiles(L, 1, sps); |
| 744 | if (sps.empty()) |
| 745 | return 0; |
| 746 | |
| 747 | vector<unordered_map<string, int>> configs; |
| 748 | for (auto sp : sps) |
| 749 | configs.emplace_back(get_stockpile_config(sp->stockpile_number)); |
| 750 | Lua::PushVector(L, configs); |
| 751 | return 1; |
| 752 | } |
| 753 | |
| 754 | static void logistics_setStockpileConfig(color_ostream& out, int stockpile_number, |
| 755 | bool melt, bool trade, |
nothing calls this directly
no test coverage detected