| 1989 | } |
| 1990 | |
| 1991 | DFhackCExport 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 | |
| 2010 | DFhackCExport command_result plugin_onstatechange(color_ostream &out, state_change_event event) |
| 2011 | { |
nothing calls this directly
no test coverage detected