This commit is contained in:
MihailRis
2025-09-22 00:06:21 +03:00
parent f02e6c65d8
commit 64b94a3e1b
6 changed files with 53 additions and 44 deletions
+9 -6
View File
@@ -1,8 +1,4 @@
#include <algorithm>
#include <filesystem>
#include <stdexcept>
#include <string>
#include <set>
#define VC_ENABLE_REFLECTION
#include "assets/AssetsLoader.hpp"
#include "content/Content.hpp"
@@ -19,6 +15,12 @@
#include "world/World.hpp"
#include "api_lua.hpp"
#include <algorithm>
#include <filesystem>
#include <stdexcept>
#include <string>
#include <set>
using namespace scripting;
static int l_pack_get_folder(lua::State* L) {
@@ -114,13 +116,14 @@ static int l_pack_get_info(
default:
throw std::runtime_error("");
}
auto opString = VersionOperatorMeta.getNameString(dpack.op);
lua::pushfstring(
L,
"%s%s@%s%s",
prefix.c_str(),
dpack.id.c_str(),
dpack.op != "=" ? dpack.op.c_str() : "",
(dpack.op == VersionOperator::EQUAL ? "" : opString).c_str(),
dpack.version.c_str()
);
lua::rawseti(L, i + 1);