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

Method set_enabled

library/PluginManager.cpp:567–580  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

565}
566
567command_result Plugin::set_enabled(color_ostream &out, bool enable)
568{
569 command_result cr = CR_NOT_IMPLEMENTED;
570 access->lock_add();
571 if(state == PS_LOADED && plugin_is_enabled && plugin_enable)
572 {
573 cr = plugin_enable(out, enable);
574
575 if (cr == CR_OK && enable != is_enabled())
576 cr = CR_FAILURE;
577 }
578 access->lock_sub();
579 return cr;
580}
581
582command_result Plugin::on_state_change(color_ostream &out, state_change_event event)
583{

Callers 2

enableMethod · 0.80
lua_set_enabledMethod · 0.80

Calls 2

lock_addMethod · 0.80
lock_subMethod · 0.80

Tested by

no test coverage detected