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

Method stat

source/game/StarPlayerCompanions.cpp:49–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49Maybe<float> Companion::stat(String const& statName) const {
50 if (auto status = m_json.opt("status"))
51 if (auto stats = status->opt("stats"))
52 return stats->optFloat(statName);
53 return {};
54}
55
56PlayerCompanions::PlayerCompanions(Json const& config) : m_config(config) {}
57

Callers

nothing calls this directly

Calls 2

optFloatMethod · 0.80
optMethod · 0.45

Tested by

no test coverage detected