| 314 | } |
| 315 | |
| 316 | static void set_next_cycle_unpaused_ms(color_ostream &out, bool has_active_combat = false) { |
| 317 | int32_t delay_ms = config.follow_ms; |
| 318 | if (config.cinematic_action && has_active_combat) { |
| 319 | std::normal_distribution<float> distribution(config.follow_ms / 2, config.follow_ms / 6); |
| 320 | delay_ms = distribution(rng); |
| 321 | delay_ms = std::min(config.follow_ms, std::max(1, delay_ms)); |
| 322 | } |
| 323 | DEBUG(cycle,out).print("next cycle in {} ms\n", delay_ms); |
| 324 | next_cycle_unpaused_ms = Core::getInstance().getUnpausedMs() + delay_ms; |
| 325 | } |
| 326 | |
| 327 | DFhackCExport command_result plugin_enable(color_ostream &out, bool enable) { |
| 328 | if (!Core::getInstance().isMapLoaded() || !World::isFortressMode()) { |
no test coverage detected