diff --git a/src/lua_maplib.c b/src/lua_maplib.c index 89b2e7c4c6a4cc79154449484c52dce1c53adb76..4b3df1bd6fe87fa93dbfa44562100d2cf43b65cb 100644 --- a/src/lua_maplib.c +++ b/src/lua_maplib.c @@ -2572,6 +2572,24 @@ static int mapheaderinfo_get(lua_State *L) lua_pushfixed(L, header->mobj_scale); else if (fastcmp(field, "gravity")) lua_pushfixed(L, header->gravity); + else if (fastcmp(field, "thumbnail")) + { + patch_t *tnpatch = header->thumbnailPic; + + if (!tnpatch) + tnpatch = W_CachePatchName("BLANKLVL", PU_PATCH); + + LUA_PushUserdata(L, tnpatch, META_PATCH); + } + else if (fastcmp(field, "minimap")) + { + patch_t *mmpatch = header->minimapPic; + + if (!mmpatch) + mmpatch = W_CachePatchName("BLANKLVL", PU_PATCH); + + LUA_PushUserdata(L, mmpatch, META_PATCH); + } else { // Read custom vars now // (note: don't include the "LUA." in your lua scripts!)