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

Function command_result plugin_onstatechange

plugins/autolabor/labormanager.cpp:1871–1886  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1869
1870
1871DFhackCExport command_result plugin_onstatechange(color_ostream &out, state_change_event event)
1872{
1873 switch (event) {
1874 case SC_MAP_LOADED:
1875 cleanup_state();
1876 init_state();
1877 break;
1878 case SC_MAP_UNLOADED:
1879 cleanup_state();
1880 break;
1881 default:
1882 break;
1883 }
1884
1885 return CR_OK;
1886}
1887
1888DFhackCExport command_result plugin_onupdate(color_ostream &out)
1889{

Callers

nothing calls this directly

Calls 2

cleanup_stateFunction · 0.70
init_stateFunction · 0.70

Tested by

no test coverage detected