diff --git a/src/content/ContentPack.cpp b/src/content/ContentPack.cpp index ec7168a28..44baea8e3 100644 --- a/src/content/ContentPack.cpp +++ b/src/content/ContentPack.cpp @@ -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++) { diff --git a/src/content/ContentPack.hpp b/src/content/ContentPack.hpp index cd5f93dbc..a2885879d 100644 --- a/src/content/ContentPack.hpp +++ b/src/content/ContentPack.hpp @@ -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 dependencies; std::string source = ""; + std::string targetVersion = ">=" + std::string(ENGINE_VERSION_STRING); io::path getContentFile() const;