| 67 | } |
| 68 | |
| 69 | void getScripts(QMap<uint64_t, QString>& scripts) |
| 70 | { |
| 71 | QString dir = getLuaDir(); |
| 72 | QDirIterator it(dir, QDirIterator::NoIteratorFlags); |
| 73 | while (it.hasNext()) |
| 74 | { |
| 75 | QFileInfo f = QFileInfo(it.next()); |
| 76 | if (f.suffix() != "lua") |
| 77 | continue; |
| 78 | uint64_t hash = getScriptHash(f); |
| 79 | if (scripts.contains(hash)) |
| 80 | qDebug() << "hash collision on: " << f.absoluteFilePath() << " and " << scripts.value(hash); |
| 81 | scripts.insert(hash, f.absoluteFilePath()); |
| 82 | } |
| 83 | } |
| 84 | |
| 85 | static bool validPos(int x, int y, int z) |
| 86 | { |
no test coverage detected