mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Expose K_IsDuelItem to Lua
This commit is contained in:
parent
4a84b21b12
commit
befde2e67b
1 changed files with 10 additions and 0 deletions
|
|
@ -3628,6 +3628,15 @@ static int lib_kReflectAngle(lua_State *L)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int lib_kIsDuelItem(lua_State *L)
|
||||
{
|
||||
mobjtype_t type = luaL_checkinteger(L, 1);
|
||||
if (type >= NUMMOBJTYPES)
|
||||
return luaL_error(L, "mobj type %d out of range (0 - %d)", type, NUMMOBJTYPES-1);
|
||||
lua_pushboolean(L, K_IsDuelItem(type));
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int lib_kGetKartGameSpeedScalar(lua_State *L)
|
||||
{
|
||||
SINT8 value = luaL_optinteger(L, 1, gamespeed);
|
||||
|
|
@ -5161,6 +5170,7 @@ static luaL_Reg lib[] = {
|
|||
{"K_TryHurtSoundExchange", lib_kTryHurtSoundExchange},
|
||||
{"K_GetPlayerDontDrawFlag", lib_kGetPlayerDontDrawFlag},
|
||||
{"K_ReflectAngle",lib_kReflectAngle},
|
||||
{"K_IsDuelItem",lib_kIsDuelItem},
|
||||
{"K_IsPlayerLosing",lib_kIsPlayerLosing},
|
||||
{"K_GetKartGameSpeedScalar",lib_kGetKartGameSpeedScalar},
|
||||
{"K_IsPlayerWanted",lib_kIsPlayerWanted},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue