mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Expose K_DropPaperItem to Lua
This commit is contained in:
parent
70c33757d3
commit
7e79cd1421
1 changed files with 14 additions and 0 deletions
|
|
@ -4231,6 +4231,19 @@ static int lib_kKartUpdatePosition(lua_State *L)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int lib_kDropPaperItem(lua_State *L)
|
||||
{
|
||||
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
|
||||
UINT8 itemtype = luaL_optinteger(L, 2, 0);
|
||||
UINT16 itemamount = luaL_optinteger(L, 3, 1);
|
||||
NOHUD
|
||||
INLEVEL
|
||||
if (!player)
|
||||
return LUA_ErrInvalid(L, "player_t");
|
||||
K_DropPaperItem(player, itemtype, itemamount);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int lib_kPopPlayerShield(lua_State *L)
|
||||
{
|
||||
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
|
||||
|
|
@ -4805,6 +4818,7 @@ static luaL_Reg lib[] = {
|
|||
{"K_SpawnDriftBoostExplosion",lib_kSpawnDriftBoostExplosion},
|
||||
{"K_SpawnDriftElectricSparks",lib_kSpawnDriftElectricSparks},
|
||||
{"K_KartUpdatePosition",lib_kKartUpdatePosition},
|
||||
{"K_DropPaperItem",lib_kDropPaperItem},
|
||||
{"K_PopPlayerShield",lib_kPopPlayerShield},
|
||||
{"K_DropHnextList",lib_kDropHnextList},
|
||||
{"K_DropItems",lib_kDropItems},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue