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

Function command_result plugin_onupdate

plugins/spectate.cpp:395–411  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

393}
394
395DFhackCExport command_result plugin_onupdate(color_ostream &out) {
396 announcement_settings.on_update(out);
397
398 if (plotinfo->follow_unit < 0 || plotinfo->follow_item > -1 || is_squads_open()) {
399 DEBUG(cycle,out).print("auto-disengage triggered\n");
400 is_enabled = false;
401 plotinfo->follow_unit = -1;
402 on_disable(out);
403 return CR_OK;
404 }
405
406 if (Core::getInstance().getUnpausedMs() >= next_cycle_unpaused_ms) {
407 recent_units.trim();
408 follow_a_dwarf(out);
409 }
410 return CR_OK;
411}
412
413static command_result do_command(color_ostream &out, vector<string> &parameters) {
414 bool show_help = false;

Callers

nothing calls this directly

Calls 6

is_squads_openFunction · 0.85
on_disableFunction · 0.85
follow_a_dwarfFunction · 0.85
trimMethod · 0.80
on_updateMethod · 0.45
printMethod · 0.45

Tested by

no test coverage detected