clear the reservation for a zone
| 376 | |
| 377 | // clear the reservation for a zone |
| 378 | static void clear_reservation(color_ostream &out, int32_t zone_id, df::building_civzonest * zone = NULL) { |
| 379 | auto it = reserved_zones.find(zone_id); |
| 380 | if (it == reserved_zones.end()) |
| 381 | return; |
| 382 | for (int32_t hfid : it->second) |
| 383 | scrub_id_from_entries(zone_id, hfid, pending_reassignment); |
| 384 | reserved_zones.erase(zone_id); |
| 385 | if (!zone) |
| 386 | zone = virtual_cast<df::building_civzonest>(df::building::find(zone_id)); |
| 387 | if (zone) |
| 388 | zone->spec_sub_flag.bits.active = true; |
| 389 | } |
| 390 | |
| 391 | // stop reserving zones for dead units or units that are no longer in an army |
| 392 | static void scrub_reservations(color_ostream &out) { |
no test coverage detected