mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-18 07:22:28 +00:00
The availability unlockable number for a skin is now available, read only, to Lua.
This commit is contained in:
parent
417e9187d9
commit
4c6ed6da76
1 changed files with 6 additions and 1 deletions
|
@ -51,7 +51,8 @@ enum skin {
|
||||||
skin_starttranscolor,
|
skin_starttranscolor,
|
||||||
skin_prefcolor,
|
skin_prefcolor,
|
||||||
skin_highresscale,
|
skin_highresscale,
|
||||||
skin_soundsid
|
skin_soundsid,
|
||||||
|
skin_availability
|
||||||
};
|
};
|
||||||
static const char *const skin_opt[] = {
|
static const char *const skin_opt[] = {
|
||||||
"valid",
|
"valid",
|
||||||
|
@ -86,6 +87,7 @@ static const char *const skin_opt[] = {
|
||||||
"prefcolor",
|
"prefcolor",
|
||||||
"highresscale",
|
"highresscale",
|
||||||
"soundsid",
|
"soundsid",
|
||||||
|
"availability",
|
||||||
NULL};
|
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])
|
#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:
|
case skin_soundsid:
|
||||||
LUA_PushUserdata(L, skin->soundsid, META_SOUNDSID);
|
LUA_PushUserdata(L, skin->soundsid, META_SOUNDSID);
|
||||||
break;
|
break;
|
||||||
|
case skin_availability:
|
||||||
|
lua_pushinteger(L, skin->availability);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue