mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 10:31:50 +00:00
add pack 'target-version' property
This commit is contained in:
parent
df057507e9
commit
a5a6e0b43c
2 changed files with 3 additions and 0 deletions
|
|
@ -160,6 +160,7 @@ ContentPack ContentPack::read(const io::path& folder) {
|
|||
checkContentPackId(pack.id, folder);
|
||||
root.at("title").get(pack.title);
|
||||
root.at("version").get(pack.version);
|
||||
root.at("target-version").get(pack.targetVersion);
|
||||
if (root.has("creators")) {
|
||||
const auto& creators = root["creators"];
|
||||
for (int i = 0; i < creators.size(); i++) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include "constants.hpp"
|
||||
#include "typedefs.hpp"
|
||||
#include "content_fwd.hpp"
|
||||
#include "io/io.hpp"
|
||||
|
|
@ -72,6 +73,7 @@ struct ContentPack {
|
|||
io::path folder;
|
||||
std::vector<DependencyPack> dependencies;
|
||||
std::string source = "";
|
||||
std::string targetVersion = ">=" + std::string(ENGINE_VERSION_STRING);
|
||||
|
||||
io::path getContentFile() const;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue