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

Function on_new_active_unit

plugins/spectate.cpp:282–286  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

280} recent_units;
281
282static void on_new_active_unit(color_ostream& out, void* data) {
283 int32_t unit_id = reinterpret_cast<std::intptr_t>(data);
284 DEBUG(event,out).print("unit {} has arrived on map\n", unit_id);
285 recent_units.add(unit_id);
286}
287
288static EventManager::EventHandler new_unit_handler(plugin_self, on_new_active_unit, RECENT_UNITS_SCAN_CYCLE);
289

Callers

nothing calls this directly

Calls 2

printMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected