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

Method statEffectiveValue

source/game/StarStatSet.cpp:111–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109}
110
111float StatSet::statEffectiveValue(String const& statName) const {
112 // All stat values will be added to m_effectiveStats regardless of whether a
113 // modifier is applied for it.
114 if (auto modified = m_effectiveStats.ptr(statName))
115 return modified->effectiveModifiedValue;
116 else
117 return 0.0f;
118}
119
120void StatSet::addResource(String resourceName, MVariant<String, float> max, MVariant<String, float> delta) {
121 auto pair = m_resources.insert({std::move(resourceName), Resource{std::move(max), std::move(delta), false, 0.0f, {}}});

Callers 2

statMethod · 0.80
TESTFunction · 0.80

Calls 1

ptrMethod · 0.45

Tested by 1

TESTFunction · 0.64