| 150 | } |
| 151 | |
| 152 | DFhackCExport command_result plugin_onupdate(color_ostream &out) { |
| 153 | DEBUG(cycle,out).print("running {} cycle\n", plugin_name); |
| 154 | |
| 155 | // fast mode 2 is handled by DF itself |
| 156 | bool is_fast = config.get_int(CONFIG_FAST) == 1; |
| 157 | bool is_tele = config.get_int(CONFIG_TELE) == 1; |
| 158 | |
| 159 | Units::forCitizens([&](auto unit) { |
| 160 | if (is_tele) |
| 161 | do_tele(out, unit); |
| 162 | |
| 163 | if (is_fast) { |
| 164 | DEBUG(cycle,out).print("fastifying unit {}\n", unit->id); |
| 165 | Units::setGroupActionTimers(out, unit, 1, df::unit_action_type_group::All); |
| 166 | } |
| 167 | }); |
| 168 | |
| 169 | return CR_OK; |
| 170 | } |
| 171 | |
| 172 | ///////////////////////////////////////////////////// |
| 173 | // CLI logic |