From 4c6ed6da76f0c6dc306dca0cfac065cc4ee79972 Mon Sep 17 00:00:00 2001 From: toasterbabe Date: Thu, 14 Jul 2016 15:51:03 +0100 Subject: [PATCH] The availability unlockable number for a skin is now available, read only, to Lua. --- src/lua_skinlib.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lua_skinlib.c b/src/lua_skinlib.c index 40737ccc1..2d1caef04 100644 --- a/src/lua_skinlib.c +++ b/src/lua_skinlib.c @@ -51,7 +51,8 @@ enum skin { skin_starttranscolor, skin_prefcolor, skin_highresscale, - skin_soundsid + skin_soundsid, + skin_availability }; static const char *const skin_opt[] = { "valid", @@ -86,6 +87,7 @@ static const char *const skin_opt[] = { "prefcolor", "highresscale", "soundsid", + "availability", NULL}; #define UNIMPLEMENTED luaL_error(L, LUA_QL("skin_t") " field " LUA_QS " is not implemented for Lua and cannot be accessed.", skin_opt[field]) @@ -205,6 +207,9 @@ static int skin_get(lua_State *L) case skin_soundsid: LUA_PushUserdata(L, skin->soundsid, META_SOUNDSID); break; + case skin_availability: + lua_pushinteger(L, skin->availability); + break; } return 1; }