| 372 | } |
| 373 | |
| 374 | DFhackCExport command_result plugin_onstatechange(color_ostream &out, state_change_event event) { |
| 375 | switch (event) { |
| 376 | case SC_WORLD_LOADED: |
| 377 | next_cycle_unpaused_ms = 0; |
| 378 | break; |
| 379 | case SC_WORLD_UNLOADED: |
| 380 | if (is_enabled) { |
| 381 | DEBUG(control,out).print("world unloaded; disabling {}\n", |
| 382 | plugin_name); |
| 383 | is_enabled = false; |
| 384 | on_disable(out, true); |
| 385 | unit_history.reset(); |
| 386 | recent_units.reset(); |
| 387 | } |
| 388 | break; |
| 389 | default: |
| 390 | break; |
| 391 | } |
| 392 | return CR_OK; |
| 393 | } |
| 394 | |
| 395 | DFhackCExport command_result plugin_onupdate(color_ostream &out) { |
| 396 | announcement_settings.on_update(out); |
nothing calls this directly
no test coverage detected