Made catpack id optional in catpack.json
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
6613deca0f
commit
f8adb508ab
@ -77,7 +77,8 @@ JsonCatPack::JsonCatPack(QFileInfo& manifestInfo) : BasicCatPack(manifestInfo.di
|
||||
auto doc = Json::requireDocument(manifestInfo.absoluteFilePath(), "CatPack JSON file");
|
||||
const auto root = doc.object();
|
||||
m_name = Json::requireString(root, "name", "Catpack name");
|
||||
m_id = Json::requireString(root, "id", "Catpack ID");
|
||||
auto id = Json::ensureString(root, "id", "", "Catpack ID");
|
||||
m_id = id.isEmpty() ? m_id : id;
|
||||
m_defaultPath = FS::PathCombine(path, Json::requireString(root, "default", "Deafult Cat"));
|
||||
auto variants = Json::ensureArray(root, "variants", QJsonArray(), "Catpack Variants");
|
||||
for (auto v : variants) {
|
||||
|
Loading…
Reference in New Issue
Block a user