| 353 | } |
| 354 | |
| 355 | DFhackCExport command_result plugin_enable(color_ostream& out, bool enable) { |
| 356 | if (enable != enabled) { |
| 357 | if (!INTERPOSE_HOOK(autogem_hook, feed).apply(enable) || !INTERPOSE_HOOK(autogem_hook, render).apply(enable)) { |
| 358 | out.printerr("Could not {} autogem hooks!\n", enable? "insert": "remove"); |
| 359 | return CR_FAILURE; |
| 360 | } |
| 361 | |
| 362 | enabled = enable; |
| 363 | } |
| 364 | |
| 365 | running = enabled && World::isFortressMode(); |
| 366 | if (running) { |
| 367 | read_config(out); |
| 368 | } |
| 369 | return CR_OK; |
| 370 | } |
| 371 | |
| 372 | DFhackCExport command_result plugin_init(color_ostream &out, std::vector <PluginCommand> &commands) { |
| 373 | commands.push_back(PluginCommand( |
nothing calls this directly
no test coverage detected