MCPcopy Create free account
hub / github.com/DFHack/dfhack / set_state

Function set_state

plugins/fastdwarf.cpp:50–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50static void set_state(color_ostream &out, int fast, int tele) {
51 DEBUG(control,out).print("setting state: fast={}, tele={}\n", fast, tele);
52 is_enabled = fast || tele;
53 config.set_int(CONFIG_FAST, fast);
54 config.set_int(CONFIG_TELE, tele);
55
56 if (debug_turbospeed)
57 *debug_turbospeed = fast == 2;
58 else if (fast == 2)
59 out.printerr("Speed level 2 not available.\n");
60}
61
62DFhackCExport command_result plugin_enable(color_ostream &out, bool enable) {
63 if (!Core::getInstance().isMapLoaded() || !World::IsSiteLoaded()) {

Callers 3

do_commandFunction · 0.85

Calls 1

printMethod · 0.45

Tested by

no test coverage detected