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

Method collectable

source/game/StarCollectionDatabase.cpp:74–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74Collectable CollectionDatabase::collectable(String const& collectionName, String const& collectableName) const {
75 try {
76 return m_collectables.get(collectionName).get(collectableName);
77 } catch (MapException const& e) {
78 throw CollectionDatabaseException(strf("Collectable '{}' not found in collection '{}'", collectableName, collectionName), e);
79 }
80}
81
82bool CollectionDatabase::hasCollectable(String const& collectionName, String const& collectableName) const {
83 return (m_collections.contains(collectionName) && m_collectables.get(collectionName).contains(collectableName));

Callers 1

addCollectableMethod · 0.80

Calls 2

strfFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected