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

Function command_result plugin_init

plugins/autolabor/labormanager.cpp:567–586  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

565}
566
567DFhackCExport command_result plugin_init(color_ostream &out, std::vector <PluginCommand> &commands)
568{
569 // initialize labor infos table from default table
570 if (ARRAY_COUNT(default_labor_infos) != ENUM_LAST_ITEM(unit_labor) + 1)
571 return CR_FAILURE;
572
573 // Fill the command list with your commands.
574 commands.push_back(PluginCommand(
575 "labormanager",
576 "Automatically manage dwarf labors.",
577 labormanager));
578
579 generate_labor_to_skill_map();
580
581 labor_mapper = new JobLaborMapper();
582
583 init_state();
584
585 return CR_OK;
586}
587
588DFhackCExport command_result plugin_shutdown(color_ostream &out)
589{

Callers

nothing calls this directly

Calls 3

PluginCommandFunction · 0.85
init_stateFunction · 0.70

Tested by

no test coverage detected