| 47 | } |
| 48 | |
| 49 | Maybe<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 | |
| 56 | PlayerCompanions::PlayerCompanions(Json const& config) : m_config(config) {} |
| 57 |