| 1305 | } |
| 1306 | |
| 1307 | DungeonDefinitions::DungeonDefinitions() : m_paths(), m_cacheMutex(), m_definitionCache(DefinitionsCacheSize) { |
| 1308 | auto assets = Root::singleton().assets(); |
| 1309 | |
| 1310 | for (auto& file : assets->scan(".dungeon")) { |
| 1311 | Json dungeon = assets->json(file); |
| 1312 | m_paths.insert(dungeon.get("metadata").getString("name"), file); |
| 1313 | } |
| 1314 | } |
| 1315 | |
| 1316 | DungeonDefinitionConstPtr DungeonDefinitions::get(String const& name) const { |
| 1317 | MutexLocker locker(m_cacheMutex); |