From a5a6e0b43c2399e6b5293dbe97def937141af111 Mon Sep 17 00:00:00 2001 From: MihailRis Date: Mon, 28 Sep 2026 01:33:27 +0300 Subject: [PATCH] add pack 'target-version' property --- src/content/ContentPack.cpp | 1 + src/content/ContentPack.hpp | 2 ++ 2 files changed, 3 insertions(+) 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;