| 64 | } |
| 65 | |
| 66 | Json PlayerCompanions::diskStore() const { |
| 67 | JsonObject result; |
| 68 | result["scriptStorage"] = m_scriptComponent.getScriptStorage(); |
| 69 | result["companions"] = jsonFromMapV(m_companions, |
| 70 | [](List<CompanionPtr> const& companions) { return companions.transformed(mem_fn(&Companion::toJson)); }); |
| 71 | return result; |
| 72 | } |
| 73 | |
| 74 | List<CompanionPtr> PlayerCompanions::getCompanions(String const& category) const { |
| 75 | if (m_companions.contains(category)) |
nothing calls this directly
no test coverage detected