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

Method modifyResourceValue

source/game/StarStatSet.cpp:158–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156}
157
158float StatSet::modifyResourceValue(String const& resourceName, float amount) {
159 auto& resource = getResource(resourceName);
160 return resource.setValue(resource.value + amount);
161}
162
163float StatSet::giveResourceValue(String const& resourceName, float amount) {
164 if (auto r = m_resources.ptr(resourceName)) {

Callers 2

modifyResourceMethod · 0.80
TESTFunction · 0.80

Calls 1

setValueMethod · 0.45

Tested by 1

TESTFunction · 0.64