| 752 | } |
| 753 | |
| 754 | static void logistics_setStockpileConfig(color_ostream& out, int stockpile_number, |
| 755 | bool melt, bool trade, |
| 756 | bool dump, bool train, |
| 757 | int forbid, bool melt_masterworks) { |
| 758 | DEBUG(control, out).print("entering logistics_setStockpileConfig\n"); |
| 759 | DEBUG(control, out).print("stockpile_number={}, melt={}, trade={}, dump={}, train={}, forbid={}, melt_masterworks={}\n", |
| 760 | stockpile_number, melt, trade, dump, train, forbid, melt_masterworks); |
| 761 | |
| 762 | if (!find_stockpile(stockpile_number)) { |
| 763 | out.printerr("invalid stockpile number: {}\n", stockpile_number); |
| 764 | return; |
| 765 | } |
| 766 | |
| 767 | auto &c = ensure_stockpile_config(out, stockpile_number); |
| 768 | c.set_bool(STOCKPILE_CONFIG_MELT, melt); |
| 769 | c.set_bool(STOCKPILE_CONFIG_MELT_MASTERWORKS, melt_masterworks); |
| 770 | c.set_bool(STOCKPILE_CONFIG_TRADE, trade); |
| 771 | c.set_bool(STOCKPILE_CONFIG_DUMP, dump); |
| 772 | c.set_bool(STOCKPILE_CONFIG_TRAIN, train); |
| 773 | c.set_int(STOCKPILE_CONFIG_FORBID, forbid); |
| 774 | } |
| 775 | |
| 776 | static int logistics_clearStockpileConfig(lua_State *L) { |
| 777 | color_ostream *out = Lua::GetOutput(L); |
nothing calls this directly
no test coverage detected