add 'creators' property
This commit is contained in:
parent
a333cadfca
commit
354e67087c
@ -1,6 +1,8 @@
|
||||
# Documentation
|
||||
|
||||
Documentation for the engine of version 0.24.
|
||||
Documentation for the engine of in-development version 0.25.
|
||||
|
||||
[Documentation for stable release 0.24.x.](https://github.com/MihailRis/VoxelEngine-Cpp/blob/release-0.24/doc/en/main-page.md)
|
||||
|
||||
## Sections
|
||||
|
||||
|
||||
@ -22,6 +22,8 @@
|
||||
}
|
||||
```
|
||||
|
||||
Вместо `creator` можно указать массив `creators`
|
||||
|
||||
Уровни зависимостей указываются с помощью префиксов в имени:
|
||||
- '!' - обязательная зависимость
|
||||
- '?' - опциональная зависимость
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
# Документация
|
||||
|
||||
Документация движка версии 0.24.
|
||||
Документация движка разрабатываемой версии 0.25.
|
||||
|
||||
[Документация стабильной версии 0.24.x.](https://github.com/MihailRis/VoxelEngine-Cpp/blob/release-0.24/doc/ru/main-page.md)
|
||||
|
||||
## Разделы
|
||||
|
||||
|
||||
@ -76,7 +76,17 @@ ContentPack ContentPack::read(const fs::path& folder) {
|
||||
root.at("id").get(pack.id);
|
||||
root.at("title").get(pack.title);
|
||||
root.at("version").get(pack.version);
|
||||
root.at("creator").get(pack.creator);
|
||||
if (root.has("creators")) {
|
||||
const auto& creators = root["creators"];
|
||||
for (int i = 0; i < creators.size(); i++) {
|
||||
if (i > 0) {
|
||||
pack.creator += ", ";
|
||||
}
|
||||
pack.creator += creators[i].asString();
|
||||
}
|
||||
} else {
|
||||
root.at("creator").get(pack.creator);
|
||||
}
|
||||
root.at("description").get(pack.description);
|
||||
pack.folder = folder;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user