add file.name(), file.stem() & add 'path' to pack info & add start_coroutine()

This commit is contained in:
MihailRis
2025-01-05 22:44:32 +03:00
parent c51a7e0153
commit 136c35591c
14 changed files with 147 additions and 70 deletions
+4 -1
View File
@@ -64,7 +64,7 @@ static int l_pack_get_available(lua::State* L) {
static int l_pack_get_info(
lua::State* L, const ContentPack& pack, const Content* content
) {
lua::createtable(L, 0, 5);
lua::createtable(L, 0, 6);
lua::pushstring(L, pack.id);
lua::setfield(L, "id");
@@ -81,6 +81,9 @@ static int l_pack_get_info(
lua::pushstring(L, pack.version);
lua::setfield(L, "version");
lua::pushstring(L, pack.path);
lua::setfield(L, "path");
if (!engine->isHeadless()) {
auto assets = engine->getAssets();
std::string icon = pack.id + ".icon";