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

Function command_result plugin_onstatechange

plugins/autoclothing.cpp:224–235  ·  view source on GitHub ↗

Called to notify the plugin about important state changes. Invoked with DF suspended, and always before the matching plugin_onupdate. More event codes may be added in the future.

Source from the content-addressed store, hash-verified

222// Invoked with DF suspended, and always before the matching plugin_onupdate.
223// More event codes may be added in the future.
224DFhackCExport command_result plugin_onstatechange(color_ostream &out, state_change_event event) {
225 switch (event)
226 {
227 case SC_WORLD_UNLOADED:
228 clothingOrders.clear();
229 is_enabled = false;
230 break;
231 default:
232 break;
233 }
234 return CR_OK;
235}
236
237DFhackCExport command_result plugin_load_site_data(color_ostream &out) {
238 cycle_timestamp = 0;

Callers

nothing calls this directly

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected