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

Method toJson

source/game/StarPlayerLog.cpp:27–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27Json PlayerLog::toJson() const {
28 auto collections = JsonObject();
29 for (auto pair : m_collections)
30 collections[pair.first] = jsonFromStringSet(pair.second);
31
32 return JsonObject{{"deathCount", m_deathCount},
33 {"playTime", m_playTime},
34 {"introComplete", m_introComplete},
35 {"scannedObjects", jsonFromStringSet(m_scannedObjects)},
36 {"radioMessages", jsonFromStringSet(m_radioMessages)},
37 {"cinematics", jsonFromStringSet(m_cinematics)},
38 {"collections", collections}};
39}
40
41int PlayerLog::deathCount() const {
42 return m_deathCount;

Callers

nothing calls this directly

Calls 1

jsonFromStringSetFunction · 0.85

Tested by

no test coverage detected