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

Method isValidModId

source/game/StarMaterialDatabase.cpp:297–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

295}
296
297bool MaterialDatabase::isValidModId(ModId mod) const {
298 if (isRealMod(mod))
299 return mod < m_mods.size() && (bool)m_mods[mod];
300 else
301 return m_metaModIndex.hasRightValue(mod);
302}
303
304ModId MaterialDatabase::modId(String const& modName) const {
305 if (auto m = m_metaModIndex.maybeRight(modName))

Callers 1

readTileSectorMethod · 0.80

Calls 3

isRealModFunction · 0.85
hasRightValueMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected