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

Function autonestbox_cycle

plugins/autonestbox.cpp:348–364  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

346}
347
348static 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}

Callers 2

df_autonestboxFunction · 0.85

Calls 3

assign_nestboxesFunction · 0.85
printMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected