| 715 | } |
| 716 | |
| 717 | static string preserve_rooms_getReservationName(color_ostream &out) { |
| 718 | auto zone = Gui::getSelectedCivZone(out, true); |
| 719 | if (!zone) |
| 720 | return ""; |
| 721 | TRACE(control,out).print("preserve_rooms_getReservationName: zone_id={}\n", zone->id); |
| 722 | auto it = reserved_zones.find(zone->id); |
| 723 | if (it != reserved_zones.end() && it->second.size() > 0) { |
| 724 | if (auto hf = df::historical_figure::find(it->second.front())) { |
| 725 | return Units::getReadableName(hf); |
| 726 | } |
| 727 | } |
| 728 | return ""; |
| 729 | } |
| 730 | |
| 731 | static bool preserve_rooms_clearReservation(color_ostream &out) { |
| 732 | auto zone = Gui::getSelectedCivZone(out, true); |