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

Method diskStore

source/game/StarPlayerCompanions.cpp:66–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66Json 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
74List<CompanionPtr> PlayerCompanions::getCompanions(String const& category) const {
75 if (m_companions.contains(category))

Callers

nothing calls this directly

Calls 3

jsonFromMapVFunction · 0.85
getScriptStorageMethod · 0.80
transformedMethod · 0.45

Tested by

no test coverage detected