| 346 | } |
| 347 | |
| 348 | static void autonestbox_cycle(color_ostream &out) { |
| 349 | // mark that we have recently run |
| 350 | cycle_timestamp = world->frame_counter; |
| 351 | |
| 352 | DEBUG(cycle,out).print("running autonestbox cycle\n"); |
| 353 | |
| 354 | size_t assigned = assign_nestboxes(out); |
| 355 | if (assigned > 0) { |
| 356 | std::stringstream ss; |
| 357 | ss << assigned << " nestbox" << (assigned == 1 ? " was" : "es were") << " assigned to roaming egg layers."; |
| 358 | string announce = ss.str(); |
| 359 | out << announce << std::endl; |
| 360 | Gui::showAnnouncement("[DFHack autonestbox] " + announce, COLOR_GREEN, false); |
| 361 | // can complain again |
| 362 | did_complain = false; |
| 363 | } |
| 364 | } |
no test coverage detected