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

Method resourceMax

source/game/StarPlayerCompanions.cpp:42–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42Maybe<float> Companion::resourceMax(String const& resourceName) const {
43 if (auto status = m_json.opt("status"))
44 if (auto resources = status->opt("resourceMax"))
45 return resources->optFloat(resourceName);
46 return {};
47}
48
49Maybe<float> Companion::stat(String const& statName) const {
50 if (auto status = m_json.opt("status"))

Callers

nothing calls this directly

Calls 2

optFloatMethod · 0.80
optMethod · 0.45

Tested by

no test coverage detected