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

Method loadStore

source/game/StarItemBag.cpp:22–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20}
21
22ItemBag ItemBag::loadStore(Json const& store) {
23 auto itemDatabase = Root::singleton().itemDatabase();
24 ItemBag res;
25 res.m_items = store.toArray().transformed([itemDatabase](Json const& v) { return itemDatabase->diskLoad(v); });
26
27 return res;
28}
29
30Json ItemBag::toJson() const {
31 auto itemDatabase = Root::singleton().itemDatabase();

Callers

nothing calls this directly

Calls 5

singletonClass · 0.85
itemDatabaseMethod · 0.80
toArrayMethod · 0.80
transformedMethod · 0.45
diskLoadMethod · 0.45

Tested by

no test coverage detected