mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Add PRECIP_ to enum lib
This commit is contained in:
parent
4c3f89cdf7
commit
087c15c1ef
1 changed files with 15 additions and 0 deletions
|
|
@ -496,6 +496,21 @@ static inline int lib_getenum(lua_State *L)
|
||||||
if (mathlib) return luaL_error(L, "menutype '%s' could not be found.\n", word);
|
if (mathlib) return luaL_error(L, "menutype '%s' could not be found.\n", word);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
else if (fastncmp("PRECIP_",word,7)) {
|
||||||
|
p = word+7;
|
||||||
|
for (i = 0; i < MAXPRECIP; i++)
|
||||||
|
{
|
||||||
|
if (precipprops[i].name == NULL)
|
||||||
|
break;
|
||||||
|
|
||||||
|
if (fastcmp(p, precipprops[i].name))
|
||||||
|
{
|
||||||
|
lua_pushinteger(L, PRECIP_NONE + i);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return luaL_error(L, "weather type '%s' does not exist.\n", word);
|
||||||
|
}
|
||||||
else if (!mathlib && fastncmp("A_",word,2)) {
|
else if (!mathlib && fastncmp("A_",word,2)) {
|
||||||
char *caps;
|
char *caps;
|
||||||
// Try to get a Lua action first.
|
// Try to get a Lua action first.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue