| 955 | } |
| 956 | |
| 957 | static 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 | |
| 972 | static void manageEquipmentEvent(color_ostream& out) { |
| 973 | if (!df::global::world) |
nothing calls this directly
no test coverage detected