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
|
@ -158,6 +158,10 @@ static int player_get(lua_State *L)
|
||||||
lua_pushinteger(L, plr->flashpal);
|
lua_pushinteger(L, plr->flashpal);
|
||||||
else if (fastcmp(field,"skincolor"))
|
else if (fastcmp(field,"skincolor"))
|
||||||
lua_pushinteger(L, plr->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"))
|
else if (fastcmp(field,"score"))
|
||||||
lua_pushinteger(L, plr->score);
|
lua_pushinteger(L, plr->score);
|
||||||
else if (fastcmp(field,"dashspeed"))
|
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);
|
return luaL_error(L, "player.skincolor %d out of range (0 - %d).", newcolor, numskincolors-1);
|
||||||
plr->skincolor = newcolor;
|
plr->skincolor = newcolor;
|
||||||
}
|
}
|
||||||
|
else if (fastcmp(field,"skin"))
|
||||||
|
return NOSET;
|
||||||
|
else if (fastcmp(field,"availabilities"))
|
||||||
|
return NOSET;
|
||||||
else if (fastcmp(field,"score"))
|
else if (fastcmp(field,"score"))
|
||||||
plr->score = (UINT32)luaL_checkinteger(L, 3);
|
plr->score = (UINT32)luaL_checkinteger(L, 3);
|
||||||
else if (fastcmp(field,"dashspeed"))
|
else if (fastcmp(field,"dashspeed"))
|
||||||
|
|
Loading…
Reference in a new issue