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

Function command_result plugin_onstatechange

plugins/timestream.cpp:238–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

236}
237
238DFhackCExport command_result plugin_onstatechange(color_ostream &out, state_change_event event) {
239 if (event == DFHack::SC_WORLD_UNLOADED) {
240 if (is_enabled) {
241 DEBUG(control,out).print("world unloaded; disabling {}\n",
242 plugin_name);
243 do_disable();
244 }
245 }
246 return CR_OK;
247}
248
249DFhackCExport command_result plugin_onupdate(color_ostream &out) {
250 if (world->frame_counter - cycle_timestamp >= CYCLE_TICKS)

Callers

nothing calls this directly

Calls 2

do_disableFunction · 0.70
printMethod · 0.45

Tested by

no test coverage detected