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

Method toJson

source/game/StarPlayerTech.cpp:22–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20}
21
22Json 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
32bool PlayerTech::isAvailable(String const& techModule) const {
33 return m_availableTechs.contains(techModule);

Callers

nothing calls this directly

Calls 2

jsonFromStringSetFunction · 0.85
jsonFromMapKFunction · 0.85

Tested by

no test coverage detected