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

Function command_result plugin_onstatechange

plugins/rendermax/rendermax.cpp:289–313  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

287
288
289DFhackCExport command_result plugin_onstatechange(color_ostream &out, state_change_event event)
290{
291 if(current_mode!=MODE_LIGHT)
292 return CR_OK;
293 switch(event)
294 {
295 case SC_VIEWSCREEN_CHANGED:
296 {
297 if(current_mode==MODE_LIGHT)
298 {
299 engine->clear();
300 }
301 }
302 break;
303 case SC_WORLD_LOADED:
304 enable_hooks(true);
305 break;
306 case SC_WORLD_UNLOADED:
307 enable_hooks(false);
308 break;
309 default:
310 break;
311 }
312 return CR_OK;
313}
314
315
316static command_result rendermax(color_ostream &out, vector <string> & parameters)

Callers

nothing calls this directly

Calls 2

enable_hooksFunction · 0.70
clearMethod · 0.45

Tested by

no test coverage detected