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

Function autochop_setTargets

plugins/autochop.cpp:714–725  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

712}
713
714static void autochop_setTargets(color_ostream &out, int32_t max_logs, int32_t min_logs) {
715 DEBUG(control,out).print("entering autochop_setTargets\n");
716 if (max_logs < min_logs || min_logs < 0) {
717 out.printerr("max and min must be at least 0 and max must be greater than min\n");
718 return;
719 }
720 config.set_int(CONFIG_MAX_LOGS, max_logs);
721 config.set_int(CONFIG_MIN_LOGS, min_logs);
722
723 // check limits and designate up to the new maximum
724 autochop_designate(out);
725}
726
727static int autochop_getTargets(lua_State *L) {
728 color_ostream *out = Lua::GetOutput(L);

Callers

nothing calls this directly

Calls 2

autochop_designateFunction · 0.85
printMethod · 0.45

Tested by

no test coverage detected