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

Function logistics_clearStockpileConfig

plugins/logistics.cpp:776–790  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

774}
775
776static int logistics_clearStockpileConfig(lua_State *L) {
777 color_ostream *out = Lua::GetOutput(L);
778 if (!out)
779 out = &Core::getInstance().getConsole();
780 DEBUG(control, *out).print("entering logistics_clearStockpileConfig\n");
781
782 vector<df::building_stockpilest*> sps;
783 find_stockpiles(L, 1, sps);
784 if (sps.empty())
785 return 0;
786
787 for (auto sp : sps)
788 remove_stockpile_config(*out, sp->stockpile_number);
789 return 0;
790}
791
792static void logistics_clearAllStockpileConfigs(color_ostream &out) {
793 DEBUG(control, out).print("entering logistics_clearAllStockpileConfigs\n");

Callers

nothing calls this directly

Calls 4

find_stockpilesFunction · 0.85
remove_stockpile_configFunction · 0.85
printMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected