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

Method setStatBaseValue

source/game/StarStatSet.cpp:32–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30}
31
32void StatSet::setStatBaseValue(String const& statName, float value) {
33 if (auto s = m_baseStats.ptr(statName)) {
34 if (*s != value) {
35 *s = value;
36 update(0.0f);
37 }
38 } else {
39 throw StatusException::format("No such base stat '{}' in StatSet", statName);
40 }
41}
42
43StatModifierGroupId StatSet::addStatModifierGroup(List<StatModifier> modifiers) {
44 bool empty = modifiers.empty();

Callers 1

TESTFunction · 0.80

Calls 2

formatFunction · 0.50
ptrMethod · 0.45

Tested by 1

TESTFunction · 0.64