MCPcopy Create free account
hub / github.com/DFHack/dfhack / command_result plugin_init

Function command_result plugin_init

plugins/autolabor/autolabor.cpp:423–440  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

421}
422
423DFhackCExport command_result plugin_init ( color_ostream &out, std::vector <PluginCommand> &commands)
424{
425 // initialize labor infos table from default table
426 if(ARRAY_COUNT(default_labor_infos) != ENUM_LAST_ITEM(unit_labor) + 1)
427 {
428 out.printerr("autolabor: labor size mismatch\n");
429 return CR_FAILURE;
430 }
431
432 commands.push_back(PluginCommand(
433 "autolabor",
434 "Automatically manage dwarf labors.",
435 autolabor));
436
437 init_state();
438
439 return CR_OK;
440}
441
442DFhackCExport command_result plugin_shutdown ( color_ostream &out )
443{

Callers

nothing calls this directly

Calls 2

PluginCommandFunction · 0.85
init_stateFunction · 0.70

Tested by

no test coverage detected