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

Function command_result plugin_onstatechange

plugins/eventful.cpp:491–506  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

489 enable_hooks(false);
490}
491DFhackCExport command_result plugin_onstatechange(color_ostream &out, state_change_event event)
492{
493 switch (event) {
494 case SC_WORLD_LOADED:
495 world_specific_hooks(out,true);
496 break;
497 case SC_WORLD_UNLOADED:
498 world_specific_hooks(out,false);
499
500 break;
501 default:
502 break;
503 }
504
505 return CR_OK;
506}
507
508DFhackCExport command_result plugin_init ( color_ostream &out, std::vector <PluginCommand> &commands)
509{

Callers

nothing calls this directly

Calls 1

world_specific_hooksFunction · 0.85

Tested by

no test coverage detected