mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
feat: projects & replace builtins.list with 'base_packs' project property
This commit is contained in:
parent
1bdb5c3145
commit
6164374666
10 changed files with 89 additions and 14 deletions
17
src/devtools/Project.cpp
Normal file
17
src/devtools/Project.cpp
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#include "Project.hpp"
|
||||
|
||||
#include "data/dv_util.hpp"
|
||||
|
||||
dv::value Project::serialize() const {
|
||||
return dv::object({
|
||||
{"name", name},
|
||||
{"title", title},
|
||||
{"base_packs", dv::to_value(basePacks)},
|
||||
});
|
||||
}
|
||||
|
||||
void Project::deserialize(const dv::value& src) {
|
||||
src.at("name").get(name);
|
||||
src.at("title").get(title);
|
||||
dv::get(src, "base_packs", basePacks);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue