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

Function questParamDetailDiskLoad

source/game/StarQuestDescriptor.cpp:93–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93QuestParamDetail questParamDetailDiskLoad(Json const& json) {
94 String type = json.getString("type");
95 if (type == "item") {
96 ItemDescriptor itemDescriptor = ItemDescriptor::loadStore(json.get("item"));
97 return QuestItem{itemDescriptor.name(), itemDescriptor.parameters()};
98
99 } else if (type == "itemList") {
100 return QuestItemList(json.getArray("items").transformed(&ItemDescriptor::loadStore));
101
102 } else {
103 return questParamDetailFromJson(json);
104 }
105}
106
107QuestParam QuestParam::diskLoad(Json const& json) {
108 return QuestParam{

Callers 1

diskLoadMethod · 0.85

Calls 7

questParamDetailFromJsonFunction · 0.85
getStringMethod · 0.80
getArrayMethod · 0.80
getMethod · 0.45
nameMethod · 0.45
parametersMethod · 0.45
transformedMethod · 0.45

Tested by

no test coverage detected