| 91 | } |
| 92 | |
| 93 | QuestParamDetail 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 | |
| 107 | QuestParam QuestParam::diskLoad(Json const& json) { |
| 108 | return QuestParam{ |
no test coverage detected