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

Method resourceValue

source/game/StarStatSet.cpp:148–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

146}
147
148float StatSet::resourceValue(String const& resourceName) const {
149 if (auto r = m_resources.ptr(resourceName))
150 return r->value;
151 return 0.0f;
152}
153
154float StatSet::setResourceValue(String const& resourceName, float value) {
155 return getResource(resourceName).setValue(value);

Callers 3

resourceMethod · 0.80
netElementsNeedStoreMethod · 0.80
TESTFunction · 0.80

Calls 1

ptrMethod · 0.45

Tested by 1

TESTFunction · 0.64