| 48 | } |
| 49 | |
| 50 | static 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 | |
| 62 | DFhackCExport command_result plugin_enable(color_ostream &out, bool enable) { |
| 63 | if (!Core::getInstance().isMapLoaded() || !World::IsSiteLoaded()) { |
no test coverage detected