29 #include <QElapsedTimer> 30 #include <QRegularExpression> 36 , mpTempRoomDeletionSet( nullptr )
37 , mUnnamedAreaName( tr(
"Unnamed Area" ) )
38 , mDefaultAreaName( tr(
"Default Area" ) )
50 auto i =
rooms.find(
id);
51 if (i !=
rooms.end() && i.key() == id) {
59 if (!
rooms.contains(
id) &&
id > 0) {
66 QString error =
QString(
"illegal room id=%1. roomID must be > 0").arg(
id);
75 if (!
rooms.contains(
id) &&
id > 0 && pR) {
89 QList<uint> deleteEntries;
90 int index = valueList.indexOf(value);
92 deleteEntries.append(index);
93 index = valueList.indexOf(value, index + 1);
95 for (
int i = deleteEntries.size() - 1; i >= 0; --i) {
96 entranceMap.remove(keyList.at(deleteEntries.at(i)), valueList.at(deleteEntries.at(i)));
106 QList<uint> deleteEntries;
107 foreach (
int roomId, valueSet) {
108 int index = valueList.indexOf(roomId);
110 deleteEntries.append(index);
111 index = valueList.indexOf(roomId, index + 1);
114 for (
unsigned int entry : deleteEntries) {
115 entranceMap.remove(keyList.at(entry), valueList.at(entry));
117 qDebug() <<
"TRoomDB::deleteValuesFromEntranceMap() with a list of:" << valueSet.size() <<
"items, run time:" << timer.nsecsElapsed() * 1.0e-9 <<
"sec.";
128 static bool showDebug =
false;
136 int id = pR->
getId();
137 QHash<int, int> exits = pR->
getExits();
138 QList<int> toExits = exits.keys();
151 for (
int toExit : toExits) {
153 values.append(QStringLiteral(
"%1,").arg(toExit));
163 if (!values.isEmpty()) {
166 if (values.isEmpty()) {
167 qDebug() <<
"TRoomDB::updateEntranceMap(TRoom * pR) called for room with id:" <<
id <<
", it is not an Entrance for any Rooms.";
169 qDebug() <<
"TRoomDB::updateEntranceMap(TRoom * pR) called for room with id:" <<
id <<
", it is an Entrance for Room(s):" << values <<
".";
178 static QMultiHash<int, int> _entranceMap;
179 static bool isBulkDelete =
false;
190 _entranceMap.detach();
195 isBulkDelete =
false;
197 _entranceMap.clear();
199 _entranceMap.detach();
204 QMultiHash<int, int>::const_iterator i = _entranceMap.constFind(
id);
241 if (r->
getUp() == id) {
247 if (r->
getIn() == id) {
259 QList<QString> keyList =
hashTable.keys();
260 QList<int> valueList =
hashTable.values();
261 for (
int i = 0; i < valueList.size(); i++) {
262 if (valueList[i] ==
id) {
286 if (
rooms.contains(
id) &&
id > 0) {
291 foreach (
QString key, profilesWithUserInThisRoom) {
309 QSet<int> deletedRoomIds;
322 deletedRoomIds.insert(deleteRoomId);
327 foreach (
int deleteRoomId, deletedRoomIds) {
333 qDebug() <<
"TRoomDB::removeRoom(QList<int>) run time for" << roomcount <<
"rooms:" << timer.nsecsElapsed() * 1.0e-9 <<
"sec.";
339 if (!
rooms.isEmpty()) {
374 qWarning() <<
"TRoomDB::removeArea(TArea *) Warning - attempt to remove an area with a NULL TArea pointer!";
378 int areaId =
areas.key(pA, 0);
379 if (areaId ==
areas.key(pA, -1)) {
384 qWarning() <<
"TRoomDB::removeArea(TArea *) Warning - attempt to remove an area NOT in TRoomDB::areas!";
390 return areas.key(pA);
397 QHashIterator<int, TRoom*> it(
rooms);
398 while (it.hasNext()) {
413 while (it2.hasNext()) {
416 if (!
areas.contains(
id)) {
420 qDebug() <<
"TRoomDB::buildAreas() run time:" << timer.nsecsElapsed() * 1.0e-9 <<
"sec.";
426 return rooms.values();
437 if (
id > 0 ||
id == -1) {
438 return areas.value(
id,
nullptr);
447 if (
areas.contains(
id)) {
451 return areas.value(
id);
463 qWarning() <<
"TRoomDB::setAreaName((int)areaID, (QString)name): WARNING: Suspect area id:" << areaID <<
"supplied.";
466 if (name.isEmpty()) {
467 qWarning() <<
"TRoomDB::setAreaName((int)areaID, (QString)name): WARNING: Empty name supplied.";
475 qWarning() <<
"TRoomDB::setAreaName((int)areaID, (QString)name): WARNING: Duplicate name supplied" << name <<
"- that is not permitted any longer!";
489 if (!
areas.contains(
id)) {
496 uint deduplicateSuffix = 0;
498 newAreaName = QStringLiteral(
"%1_%2").arg(
mUnnamedAreaName).arg(++deduplicateSuffix, 3, 10, QLatin1Char(
'0'));
505 QString error = tr(
"Area with ID=%1 already exists!").arg(
id);
514 while (
areas.contains(
id)) {
523 if (name.isEmpty()) {
524 QString error = tr(
"An Unnamed Area is (no longer) permitted!");
528 QString error = tr(
"An area called %1 already exists!").arg(name);
555 if (!name.isEmpty()) {
566 return areas.values();
597 QSet<int> validUsedRoomIds;
598 QSet<int> validUsedAreaIds;
603 QHash<int, int> roomAreaHash;
604 QMultiHash<int, int> areaRoomMultiHash;
607 QMutableHashIterator<int, TRoom*> itRoom(
rooms);
608 while (itRoom.hasNext()) {
610 TRoom* pR = itRoom.value();
613 QString warnMsg = tr(
"[ WARN ] - Problem with data structure associated with room id: %1 - that\n" 614 "room's data has been lost so the id is now being deleted. This\n" 615 "suggests serious problems with the currently running version of\n" 616 "Mudlet - is your system running out of memory?")
621 tr(
"[ WARN ] - Problem with data structure associated with this room." 622 " The room's data has been lost so the id is now being deleted." 623 " This suggests serious problems with the currently running version of Mudlet" 624 " - is your system running out of memory?"),
629 if (itRoom.key() >= 1) {
630 validUsedRoomIds.insert(itRoom.key());
632 roomRemapping.insert(itRoom.key(), itRoom.key());
638 areaRoomMultiHash.insert(areaId, itRoom.key());
639 roomAreaHash.insert(itRoom.key(), areaId);
644 QSet<int> areaIdSet = areaRoomMultiHash.keys().toSet();
654 QSetIterator<int> itUsedArea(areaIdSet);
657 QList<int> missingAreasNeeded;
658 while (itUsedArea.hasNext()) {
659 int usedAreaId = itUsedArea.next();
660 if (usedAreaId < -1 || !usedAreaId) {
661 areaRemapping.insert(usedAreaId, usedAreaId);
663 validUsedAreaIds.insert(usedAreaId);
666 if (!
areas.contains(usedAreaId)) {
668 QString warnMsg = tr(
"[ ALERT ] - Area with id: %1 expected but not found, will be created.").arg(usedAreaId);
671 mpMap->
appendAreaErrorMsg(usedAreaId, tr(
"[ ALERT ] - Area with this id expected but not found, will be created."),
true);
672 missingAreasNeeded.append(usedAreaId);
678 QMapIterator<int, TArea*> itArea(
areas);
679 while (itArea.hasNext()) {
681 int areaId = itArea.key();
682 if (areaId < -1 || !areaId) {
683 areaRemapping.insert(areaId, areaId);
685 validUsedAreaIds.insert(areaId);
698 if (!missingAreasNeeded.isEmpty()) {
700 QString alertMsg = tr(
"[ ALERT ] - %n area(s) detected as missing in map: adding it/them in.\n" 701 " Look for further messsages related to the rooms that are supposed\n" 702 " to be in this/these area(s)...",
703 "Making use of %n to allow quantity dependent message form 8-) !",
704 missingAreasNeeded.count());
708 " Look for further messsages related to the rooms that is/are supposed to\n" 709 " be in this/these area(s)...",
710 "Making use of %n to allow quantity dependent message form 8-) !",
711 missingAreasNeeded.count()),
716 infoMsg = tr(
"[ INFO ] - The missing area(s) are now called:\n" 718 "Making use of %n to allow quantity dependent message form 8-) !",
719 missingAreasNeeded.count());
722 if (missingAreasNeeded.count() > 1) {
725 std::sort(missingAreasNeeded.begin(), missingAreasNeeded.end());
728 for (
int newAreaId : missingAreasNeeded) {
733 infoMsg.append(QStringLiteral(
"\n%1 ==> \"%2\"").arg(QString::number(newAreaId),
areaNamesMap.value(newAreaId)));
739 missingAreasNeeded.clear();
749 if (!areaRemapping.isEmpty()) {
751 QString alertMsg = tr(
"[ ALERT ] - Bad, (less than +1 and not the reserved -1) area ids found (count: %1)\n" 752 "in map, now working out what new id numbers to use...")
753 .arg(areaRemapping.count());
756 mpMap->
appendErrorMsg(tr(
"[ ALERT ] - Bad, (less than +1 and not the reserved -1) area ids found (count: %1) in map!" 757 " Look for further messsages related to this for each affected area ...")
758 .arg(areaRemapping.count()),
763 infoMsg = tr(
"[ INFO ] - The renumbered area ids will be:\n" 767 QMutableHashIterator<int, int> itRemappedArea(areaRemapping);
768 while (itRemappedArea.hasNext()) {
769 itRemappedArea.next();
770 int faultyAreaId = itRemappedArea.key();
771 int replacementAreaId = 0;
774 }
while (
areas.contains(++replacementAreaId));
776 itRemappedArea.setValue(replacementAreaId);
778 infoMsg.append(QStringLiteral(
"\n%1 ==> %2").arg(QString::number(faultyAreaId), QString::number(replacementAreaId)));
781 mpMap->
appendAreaErrorMsg(faultyAreaId, tr(
"[ INFO ] - The area with this bad id was renumbered to: %1.").arg(replacementAreaId),
true);
782 mpMap->
appendAreaErrorMsg(replacementAreaId, tr(
"[ INFO ] - This area was renumbered from the bad id: %1.").arg(faultyAreaId),
true);
785 if (
areas.contains(faultyAreaId)) {
786 pA =
areas.take(faultyAreaId);
801 uint deduplicateSuffix = 0;
803 newAreaName = QStringLiteral(
"%1_%2").arg(
mUnnamedAreaName).arg(++deduplicateSuffix, 3, 10, QLatin1Char(
'0'));
808 pA->
mUserData.insert(QStringLiteral(
"audit.remapped_id"), QString::number(faultyAreaId));
809 validUsedAreaIds.insert(replacementAreaId);
810 areas.insert(replacementAreaId, pA);
814 QMap<qint32, TMapLabel> areaMapLabels =
mpMap->
mapLabels.take(faultyAreaId);
825 QString infoMsg = tr(
"[ INFO ] - Area id numbering is satisfactory.");
834 if (!roomRemapping.isEmpty()) {
836 QString alertMsg = tr(
"[ ALERT ] - Bad, (less than +1) room ids found (count: %1) in map, now working\n" 837 "out what new id numbers to use.")
838 .arg(roomRemapping.count());
841 mpMap->
appendErrorMsg(tr(
"[ ALERT ] - Bad, (less than +1) room ids found (count: %1) in map!" 842 " Look for further messsages related to this for each affected room ...")
843 .arg(roomRemapping.count()),
848 infoMsg = tr(
"[ INFO ] - The renumbered rooms will be:\n");
850 QMutableHashIterator<int, int> itRenumberedRoomId(roomRemapping);
851 while (itRenumberedRoomId.hasNext()) {
852 itRenumberedRoomId.next();
853 unsigned int newRoomId = 0;
856 }
while (validUsedRoomIds.contains(++newRoomId));
858 itRenumberedRoomId.setValue(newRoomId);
859 validUsedRoomIds.insert(newRoomId);
861 infoMsg.append(QStringLiteral(
"%1 ==> %2").arg(QString::number(itRenumberedRoomId.key()), QString::number(itRenumberedRoomId.value())));
864 mpMap->
appendRoomErrorMsg(itRenumberedRoomId.key(), tr(
"[ INFO ] - This room with the bad id was renumbered to: %1.").arg(itRenumberedRoomId.value()),
true);
865 mpMap->
appendRoomErrorMsg(itRenumberedRoomId.value(), tr(
"[ INFO ] - This room was renumbered from the bad id: %1.").arg(itRenumberedRoomId.key()),
true);
871 QSet<TRoom*> holdingSet;
873 QMutableHashIterator<int, TRoom*> itRoom(
rooms);
880 while (itRoom.hasNext()) {
882 TRoom* pR = itRoom.value();
883 if (roomRemapping.contains(itRoom.key())) {
884 pR->
userData.insert(QStringLiteral(
"audit.remapped_id"), QString::number(itRoom.key()));
885 pR->
setId(roomRemapping.value(itRoom.key()));
887 holdingSet.insert(pR);
893 QSetIterator<TRoom*> itModifiedRoom(holdingSet);
894 while (itModifiedRoom.hasNext()) {
895 TRoom* pR = itModifiedRoom.next();
896 int newRoomId = pR->
getId();
897 rooms.insert(newRoomId, pR);
901 QString infoMsg = tr(
"[ INFO ] - Room id numbering is satisfactory.");
910 QMutableHashIterator<int, TRoom*> itRoom(
rooms);
911 while (itRoom.hasNext()) {
913 TRoom* pR = itRoom.value();
917 unsigned int _listCount = pR->
exitStubs.count();
919 if (_set.count() < _listCount) {
921 QString infoMsg = tr(
"[ INFO ] - Duplicate exit stub identifiers found in room id: %1, this is an\n" 922 "anomaly but has been cleaned up easily.")
926 mpMap->
appendRoomErrorMsg(itRoom.key(), tr(
"[ INFO ] - Duplicate exit stub identifiers found in room, this is an anomaly but has been cleaned up easily."),
false);
933 if (_set.count() < _listCount) {
935 QString infoMsg = tr(
"[ INFO ] - Duplicate exit lock identifiers found in room id: %1, this is an\n" 936 "anomaly but has been cleaned up easily.")
940 mpMap->
appendRoomErrorMsg(itRoom.key(), tr(
"[ INFO ] - Duplicate exit lock identifiers found in room, this is an anomaly but has been cleaned up easily."),
false);
945 pR->
audit(roomRemapping, areaRemapping);
952 QMapIterator<int, TArea*> itArea(
areas);
953 while (itArea.hasNext()) {
955 TArea* pA = itArea.value();
956 QSet<int> replacementRoomsSet;
958 QMutableSetIterator<int> itAreaRoom(pA->
rooms);
959 if (!roomRemapping.isEmpty()) {
960 while (itAreaRoom.hasNext()) {
961 int originalRoomId = itAreaRoom.next();
962 if (roomRemapping.contains(originalRoomId)) {
964 replacementRoomsSet.insert(roomRemapping.value(originalRoomId));
970 if (!replacementRoomsSet.isEmpty()) {
971 pA->
rooms.unite(replacementRoomsSet);
975 QSet<int> foundRooms = areaRoomMultiHash.values(itArea.key()).toSet();
976 QSetIterator<int> itFoundRoom(foundRooms);
985 QSet<int> extraRooms(pA->
rooms);
987 QSet<int> missingRooms;
989 while (itFoundRoom.hasNext()) {
990 checkRoom = itFoundRoom.next();
991 if (pA->
rooms.contains(checkRoom)) {
992 extraRooms.remove(checkRoom);
994 missingRooms.insert(checkRoom);
999 if (!missingRooms.isEmpty()) {
1000 QStringList roomList;
1001 QList<int> missingRoomsList = missingRooms.toList();
1002 if (missingRoomsList.size() > 1) {
1004 std::sort(missingRoomsList.begin(), missingRoomsList.end());
1006 QListIterator<int> itMissingRoom(missingRoomsList);
1007 while (itMissingRoom.hasNext()) {
1008 int missingRoomId = itMissingRoom.next();
1009 roomList.append(QString::number(missingRoomId));
1011 tr(
"[ INFO ] - This room claims to be in area id: %1, but that did not have a record of it." 1012 " The area has been updated to include this room.")
1017 QString infoMsg = tr(
"[ INFO ] - In area with id: %1 there were %2 rooms missing from those it\n" 1018 "should be recording as possessing, they were:\n%3\nthey have been added.")
1020 .arg(missingRooms.count())
1021 .arg(roomList.join(QStringLiteral(
", ")));
1025 tr(
"[ INFO ] - In this area there were %1 rooms missing from those it should be recorded as possessing." 1027 " They have been added.")
1028 .arg(missingRooms.count())
1029 .arg(roomList.join(QStringLiteral(
", "))),
1035 if (!extraRooms.isEmpty()) {
1036 QStringList roomList;
1037 QList<int> extraRoomsList = extraRooms.toList();
1038 if (extraRoomsList.size() > 1) {
1039 std::sort(extraRoomsList.begin(), extraRoomsList.end());
1041 QListIterator<int> itExtraRoom(extraRoomsList);
1042 while (itExtraRoom.hasNext()) {
1043 int extraRoomId = itExtraRoom.next();
1044 roomList.append(QString::number(extraRoomId));
1046 tr(
"[ INFO ] - This room was claimed by area id: %1, but it does not belong there." 1047 " The area has been updated to not include this room.")
1052 QString infoMsg = tr(
"[ INFO ] - In area with id: %1 there were %2 extra rooms compared to those it\n" 1053 "should be recording as possessing, they were:\n%3\nthey have been removed.")
1055 .arg(extraRooms.count())
1056 .arg(roomList.join(QStringLiteral(
", ")));
1060 tr(
"[ INFO ] - In this area there were %1 extra rooms that it should not be recorded as possessing." 1062 " They have been removed.")
1063 .arg(extraRooms.count())
1064 .arg(roomList.join(QStringLiteral(
", "))),
1068 pA->
rooms = foundRooms;
1076 QElapsedTimer timer;
1083 for (
auto room : rPtrL) {
1090 for (
auto area : areaList) {
1093 assert(
areas.empty());
1096 qDebug() <<
"TRoomDB::clearMapDB() run time:" << timer.nsecsElapsed() * 1.0e-9 <<
"sec.";
1101 QMap<int, QString> areaNamesMapWithPossibleEmptyOrDuplicateItems;
1102 ifs >> areaNamesMapWithPossibleEmptyOrDuplicateItems;
1107 QMultiMap<QString, QString> renamedMap;
1108 QMapIterator<int, QString> itArea = areaNamesMapWithPossibleEmptyOrDuplicateItems;
1109 bool isMatchingSuffixAlreadyPresent =
false;
1110 bool isEmptyAreaNamePresent =
false;
1111 while (itArea.hasNext()) {
1114 if (itArea.value().isEmpty()) {
1115 isEmptyAreaNamePresent =
true;
1119 nonEmptyAreaName = itArea.value();
1121 if (
areaNamesMap.values().contains(nonEmptyAreaName)) {
1123 if (nonEmptyAreaName.contains(QRegularExpression(QStringLiteral(R
"(_\d\d\d$)")))) { 1127 isMatchingSuffixAlreadyPresent =
true;
1128 nonEmptyAreaName.chop(4);
1130 uint deduplicateSuffix = 0;
1133 replacementName = QStringLiteral(
"%1_%2").arg(nonEmptyAreaName).arg(++deduplicateSuffix, 3, 10, QLatin1Char(
'0'));
1134 }
while (
areaNamesMap.values().contains(replacementName));
1135 if ((!itArea.value().isEmpty()) && (!renamedMap.contains(itArea.value()))) {
1141 renamedMap.insert(itArea.value(), itArea.value());
1143 renamedMap.insert(itArea.value(), replacementName);
1146 if (itArea.value().isEmpty()) {
1147 renamedMap.insert(itArea.value(), nonEmptyAreaName);
1152 if (!renamedMap.empty() || isEmptyAreaNamePresent) {
1155 QString extraTextForMatchingSuffixAlreadyUsed;
1157 if (isMatchingSuffixAlreadyPresent) {
1158 extraTextForMatchingSuffixAlreadyUsed = tr(
1159 R
"(It has been detected that "_###" form suffixes have already been used, for simplicity in the renaming algorithm these will have been removed and possibly changed as Mudlet sorts this matter out, if a number assigned in this way <b>is</b> important to you, you can change it back, provided you rename the area that has been allocated the suffix that was wanted first...!</p>)"); 1161 if (!renamedMap.empty()) {
1162 detailText = tr(
"[ OK ] - The changes made are:\n" 1163 "(ID) \"old name\" ==> \"new name\"\n");
1164 QMapIterator<QString, QString> itRemappedNames = renamedMap;
1165 itRemappedNames.toBack();
1167 while (itRemappedNames.hasPrevious()) {
1168 itRemappedNames.previous();
1169 QString oldName = itRemappedNames.key().isEmpty() ? tr(
"<nothing>") : itRemappedNames.key();
1170 detailText.append(QStringLiteral(
"(%1) \"%2\" ==> \"%3\"\n").arg(
areaNamesMap.key(itRemappedNames.value())).arg(oldName, itRemappedNames.value()));
1172 tr(R
"([ INFO ] - Area name changed to prevent duplicates or unnamed ones; old name: "%1", new name: "%2".)").arg(oldName, itRemappedNames.value()), 1178 if (!renamedMap.empty() && isEmptyAreaNamePresent) {
1181 alertText = tr(
"[ ALERT ] - Empty and duplicate area names detected in Map file!");
1182 informativeText = tr(
"[ INFO ] - Due to some situations not being checked in the past, Mudlet had\n" 1183 "allowed the map to have more than one area with the same or no name.\n" 1184 "These make some things confusing and are now disallowed.\n" 1185 " To resolve these cases, an area without a name here (or created in\n" 1186 "the future) will automatically be assigned the name \"%1\".\n" 1187 " Duplicated area names will cause all but the first encountered one\n" 1188 "to gain a \"_###\" style suffix where each \"###\" is an increasing\n" 1189 "number; you may wish to change these, perhaps by replacing them with\n" 1190 "a \"(sub-area name)\" but it is entirely up to you how you do this,\n" 1191 "other then you will not be able to set one area's name to that of\n" 1192 "another that exists at the time.\n" 1193 " If there were more than one area without a name then all but the\n" 1194 "first will also gain a suffix in this manner.\n" 1196 }
else if (!renamedMap.empty()) {
1198 alertText = tr(
"[ ALERT ] - Duplicate area names detected in the Map file!");
1199 informativeText = tr(
"[ INFO ] - Due to some situations not being checked in the past, Mudlet had\n" 1200 "allowed the user to have more than one area with the same name.\n" 1201 "These make some things confusing and are now disallowed.\n" 1202 " Duplicated area names will cause all but the first encountered one\n" 1203 "to gain a \"_###\" style suffix where each \"###\" is an increasing\n" 1204 "number; you may wish to change these, perhaps by replacing them with\n" 1205 "a \"(sub-area name)\" but it is entirely up to you how you do this,\n" 1206 "other then you will not be able to set one area's name to that of\n" 1207 "another that exists at the time.\n" 1208 " If there were more than one area without a name then all but the\n" 1209 "first will also gain a suffix in this manner.\n" 1211 .arg(extraTextForMatchingSuffixAlreadyUsed);
1214 alertText = tr(
"[ ALERT ] - An empty area name was detected in the Map file!");
1217 informativeText = tr(
"[ OK ] - Due to some situations not being checked in the past, Mudlet had\n" 1218 "allowed the map to have an area with no name. This can make some\n" 1219 "things confusing and is now disallowed.\n" 1220 " To resolve this case, the area without a name here (or one created\n" 1221 "in the future) will automatically be assigned the name \"%1\".\n" 1222 " If this happens more then once the duplication of area names will\n" 1223 "cause all but the first encountered one to gain a \"_###\" style\n" 1224 "suffix where each \"###\" is an increasing number; you may wish to\n" 1225 "change these, perhaps by adding more meaningful area names but it is\n" 1226 "entirely up to you what is used, other then you will not be able to\n" 1227 "set one area's name to that of another that exists at the time.")
1234 if (!detailText.isEmpty()) {
1241 QString defaultAreaNameInsertionMsg = tr(
"[ INFO ] - Default (reset) area name (for rooms that have not been assigned to an\n" 1242 "area) not found, adding \"%1\" against the reserved -1 id.")
1244 mpMap->
mpHost->postMessage(defaultAreaNameInsertionMsg);
1264 qWarning() <<
"TRoomDB::setAreaRooms(" << areaId <<
", ... ) ERROR - Non-existant area Id given...!";
1268 QSetIterator<int> itAreaRoom(roomIds);
1269 while (itAreaRoom.hasNext()) {
1270 pA->
addRoom(itAreaRoom.next());
void appendRoomErrorMsg(int, QString, bool isToSetFileViewingRecommended=false)
const QList< TRoom * > getRoomPtrList()
QList< int > getAreaIDList()
bool __removeRoom(int id)
void logError(QString &msg)
QMultiHash< int, int > entranceMap
bool mMapGraphNeedsUpdate
bool showMapAuditErrors() const
void appendErrorMsgWithNoLf(QString, bool isToSetFileViewingRecommended=false)
void restoreAreaMap(QDataStream &)
void updateEntranceMap(TRoom *, bool isMapLoading=false)
Q_DECLARE_TR_FUNCTIONS(TRoomDB) public TRoom * getRoom(int id)
void setNorthwest(int id)
QMap< QString, QString > mUserData
bool setAreaName(int areaID, QString name)
void audit(QHash< int, int >, QHash< int, int >)
void setNortheast(int id)
void auditRooms(QHash< int, int > &, QHash< int, int > &)
TArea * getRawArea(int, bool *)
const QList< TArea * > getAreaPtrList()
QList< int > getRoomIDList()
void restoreSingleRoom(int, TRoom *)
QSet< int > * mpTempRoomDeletionSet
void setAreaRooms(int, const QSet< int > &)
void postMessage(QString text)
QHash< QString, int > mRoomIdHash
QMap< int, QString > areaNamesMap
void restoreSingleArea(int, TArea *)
void appendAreaErrorMsg(int, QString, bool isToSetFileViewingRecommended=false)
void setSouthwest(int id)
void removeAllSpecialExitsToRoom(int _id)
QMap< QString, QString > userData
QMap< QString, int > hashTable
QMap< qint32, QMap< qint32, TMapLabel > > mapLabels
void setSoutheast(int id)
QHash< int, int > getExits()
QMap< int, TArea * > areas
QHash< int, TRoom * > rooms
void removeRoom(int, bool isToDeferAreaRelatedRecalculations=false)
void deleteValuesFromEntranceMap(int)
void appendErrorMsg(QString, bool isToSetFileViewingRecommended=false)