| 291 | } |
| 292 | |
| 293 | float StatSet::Resource::setValue(float v) { |
| 294 | if (maxValue) |
| 295 | value = clamp(v, 0.0f, *maxValue); |
| 296 | else |
| 297 | value = Star::max(v, 0.0f); |
| 298 | return value; |
| 299 | } |
| 300 | |
| 301 | StatSet::Resource const& StatSet::getResource(String const& resourceName) const { |
| 302 | if (auto r = m_resources.ptr(resourceName)) |
no test coverage detected