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

Function command_result plugin_onstatechange

plugins/add-spatter.cpp:386–399  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

384}
385
386DFhackCExport command_result plugin_onstatechange(color_ostream &out, state_change_event event)
387{
388 switch (event) {
389 case SC_WORLD_UNLOADED:
390 enable_hooks(false);
391 reactions.clear();
392 products.clear();
393 break;
394 default:
395 break;
396 }
397
398 return CR_OK;
399}
400
401DFhackCExport command_result plugin_init ( color_ostream &out, std::vector <PluginCommand> &commands)
402{

Callers

nothing calls this directly

Calls 2

enable_hooksFunction · 0.70
clearMethod · 0.45

Tested by

no test coverage detected