| 20 | } |
| 21 | |
| 22 | Json PlayerTech::toJson() const { |
| 23 | return JsonObject{ |
| 24 | {"availableTechs", jsonFromStringSet(m_availableTechs)}, |
| 25 | {"enabledTechs", jsonFromStringSet(m_enabledTechs)}, |
| 26 | {"equippedTechs", jsonFromMapK(m_equippedTechs, [](TechType t) { |
| 27 | return TechTypeNames.getRight(t); |
| 28 | })}, |
| 29 | }; |
| 30 | } |
| 31 | |
| 32 | bool PlayerTech::isAvailable(String const& techModule) const { |
| 33 | return m_availableTechs.contains(techModule); |
nothing calls this directly
no test coverage detected