mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-20 19:02:34 +00:00
Merge branch 'exposed!!!' into 'next'
Expose player.skin and player.availabilities to Lua as Read-only See merge request STJr/SRB2!1269
This commit is contained in:
commit
1d31fe3759
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