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

Function manageInvasionEvent

library/modules/EventManager.cpp:957–970  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

955}
956
957static void manageInvasionEvent(color_ostream& out) {
958 if (!df::global::plotinfo)
959 return;
960 multimap<Plugin*,EventHandler> copy(handlers[EventType::INVASION].begin(), handlers[EventType::INVASION].end());
961
962 if ( df::global::plotinfo->invasions.next_id <= nextInvasion )
963 return;
964 nextInvasion = df::global::plotinfo->invasions.next_id;
965
966 for (auto &[_,handle] : copy) {
967 DEBUG(log,out).print("calling handler for invasion event\n");
968 run_handler(out, EventType::INVASION, handle, (void*)intptr_t(nextInvasion-1));
969 }
970}
971
972static void manageEquipmentEvent(color_ostream& out) {
973 if (!df::global::world)

Callers

nothing calls this directly

Calls 4

run_handlerFunction · 0.85
beginMethod · 0.45
endMethod · 0.45
printMethod · 0.45

Tested by

no test coverage detected