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

Function enable_plugin

plugins/autolabor/autolabor.cpp:396–410  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

394
395
396static void enable_plugin(color_ostream &out)
397{
398 if (!config.isValid())
399 {
400 config = World::AddPersistentSiteData("autolabor/config");
401 config.ival(0) = 0;
402 }
403
404 setOptionEnabled(CF_ENABLED, true);
405 enable_autolabor = true;
406 out << "Enabling autolabor." << std::endl;
407
408 cleanup_state();
409 init_state();
410}
411
412static void disable_plugin(color_ostream& out)
413{

Callers 1

Calls 5

ivalMethod · 0.80
setOptionEnabledFunction · 0.70
cleanup_stateFunction · 0.70
init_stateFunction · 0.70
isValidMethod · 0.45

Tested by

no test coverage detected