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

Function command_result plugin_onstatechange

plugins/workflow.cpp:89–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87}
88
89DFhackCExport command_result plugin_onstatechange(color_ostream &out, state_change_event event)
90{
91 switch (event) {
92 case SC_MAP_LOADED:
93 cleanup_state(out);
94 init_state(out);
95 break;
96 case SC_MAP_UNLOADED:
97 cleanup_state(out);
98 break;
99 default:
100 break;
101 }
102
103 return CR_OK;
104}
105
106/******************************
107 * JOB STATE TRACKING STRUCTS *

Callers

nothing calls this directly

Calls 2

cleanup_stateFunction · 0.70
init_stateFunction · 0.70

Tested by

no test coverage detected