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

Function autochop_getLogCounts

plugins/autochop.cpp:737–749  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

735}
736
737static int autochop_getLogCounts(lua_State *L) {
738 color_ostream *out = Lua::GetOutput(L);
739 if (!out)
740 out = &Core::getInstance().getConsole();
741 DEBUG(control,*out).print("entering autochop_getNumLogs\n");
742 int32_t usable_logs, inaccessible_logs;
743 vector<df::unit *> citizens;
744 Units::getCitizens(citizens, true);
745 scan_logs(*out, &usable_logs, citizens, &inaccessible_logs);
746 Lua::Push(L, usable_logs);
747 Lua::Push(L, inaccessible_logs);
748 return 2;
749}
750
751static void push_burrow_config(lua_State *L, int id, bool chop = false,
752 bool clearcut = false, bool protect_brewable = false,

Callers

nothing calls this directly

Calls 3

scan_logsFunction · 0.85
PushFunction · 0.85
printMethod · 0.45

Tested by

no test coverage detected