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

Function preserve_rooms_getReservationName

plugins/preserve-rooms.cpp:717–729  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

715}
716
717static 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
731static bool preserve_rooms_clearReservation(color_ostream &out) {
732 auto zone = Gui::getSelectedCivZone(out, true);

Callers

nothing calls this directly

Calls 6

getSelectedCivZoneFunction · 0.85
findFunction · 0.50
printMethod · 0.45
findMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected