| 465 | INTERPOSE_HOOK(work_hook,drawBuilding).apply(enable); |
| 466 | } |
| 467 | DFhackCExport command_result plugin_onstatechange(color_ostream &out, state_change_event event) |
| 468 | { |
| 469 | switch (event) { |
| 470 | case SC_WORLD_LOADED: |
| 471 | enable_hooks(true); |
| 472 | break; |
| 473 | case SC_WORLD_UNLOADED: |
| 474 | enable_hooks(false); |
| 475 | clear_mapping(); |
| 476 | break; |
| 477 | default: |
| 478 | break; |
| 479 | } |
| 480 | |
| 481 | return CR_OK; |
| 482 | } |
| 483 | DFhackCExport command_result plugin_init ( color_ostream &out, std::vector <PluginCommand> &commands) |
| 484 | { |
| 485 | enable_hooks(true); |
nothing calls this directly
no test coverage detected