MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / DungeonDefinitions

Method DungeonDefinitions

source/game/StarDungeonGenerator.cpp:1307–1314  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1305}
1306
1307DungeonDefinitions::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
1316DungeonDefinitionConstPtr DungeonDefinitions::get(String const& name) const {
1317 MutexLocker locker(m_cacheMutex);

Callers

nothing calls this directly

Calls 7

singletonClass · 0.85
assetsMethod · 0.80
jsonMethod · 0.80
getStringMethod · 0.80
scanMethod · 0.45
insertMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected