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

Function command_result plugin_enable

plugins/siege-engine.cpp:1991–2008  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1989}
1990
1991DFhackCExport command_result plugin_enable(color_ostream &out, bool enable)
1992{
1993 if (gamemode && *gamemode != game_mode::DWARF)
1994 return CR_FAILURE;
1995
1996 if (enable != is_enabled)
1997 {
1998 if (enable)
1999 enable_plugin();
2000 else
2001 {
2002 World::DeletePersistentData(World::GetPersistentData("siege-engine/enabled"));
2003 enable_hooks(false);
2004 }
2005 }
2006
2007 return CR_OK;
2008}
2009
2010DFhackCExport command_result plugin_onstatechange(color_ostream &out, state_change_event event)
2011{

Callers

nothing calls this directly

Calls 2

enable_pluginFunction · 0.70
enable_hooksFunction · 0.70

Tested by

no test coverage detected