mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-12 22:02:12 +00:00
Expose player.skin
and player.availabilities
to Lua as Read-only
This commit is contained in:
parent
50e15840fb
commit
b2d6d4f83f
1 changed files with 8 additions and 0 deletions
|
@ -158,6 +158,10 @@ static int player_get(lua_State *L)
|
|||
lua_pushinteger(L, plr->flashpal);
|
||||
else if (fastcmp(field,"skincolor"))
|
||||
lua_pushinteger(L, plr->skincolor);
|
||||
else if (fastcmp(field,"skin"))
|
||||
lua_pushinteger(L, plr->skin);
|
||||
else if (fastcmp(field,"availabilities"))
|
||||
lua_pushinteger(L, plr->availabilities);
|
||||
else if (fastcmp(field,"score"))
|
||||
lua_pushinteger(L, plr->score);
|
||||
else if (fastcmp(field,"dashspeed"))
|
||||
|
@ -469,6 +473,10 @@ static int player_set(lua_State *L)
|
|||
return luaL_error(L, "player.skincolor %d out of range (0 - %d).", newcolor, numskincolors-1);
|
||||
plr->skincolor = newcolor;
|
||||
}
|
||||
else if (fastcmp(field,"skin"))
|
||||
return NOSET;
|
||||
else if (fastcmp(field,"availabilities"))
|
||||
return NOSET;
|
||||
else if (fastcmp(field,"score"))
|
||||
plr->score = (UINT32)luaL_checkinteger(L, 3);
|
||||
else if (fastcmp(field,"dashspeed"))
|
||||
|
|
Loading…
Reference in a new issue