mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 01:01:33 +00:00
Expose floor/ceiling lighting to Lua
This commit is contained in:
parent
e15c160773
commit
e43831bedb
1 changed files with 32 additions and 0 deletions
|
@ -35,6 +35,10 @@ enum sector_e {
|
|||
sector_floorpic,
|
||||
sector_ceilingpic,
|
||||
sector_lightlevel,
|
||||
sector_floorlightlevel,
|
||||
sector_floorlightabsolute,
|
||||
sector_ceilinglightlevel,
|
||||
sector_ceilinglightabsolute,
|
||||
sector_special,
|
||||
sector_tag,
|
||||
sector_taglist,
|
||||
|
@ -54,6 +58,10 @@ static const char *const sector_opt[] = {
|
|||
"floorpic",
|
||||
"ceilingpic",
|
||||
"lightlevel",
|
||||
"floorlightlevel",
|
||||
"floorlightabsolute",
|
||||
"ceilinglightlevel",
|
||||
"ceilinglightabsolute",
|
||||
"special",
|
||||
"tag",
|
||||
"taglist",
|
||||
|
@ -591,6 +599,18 @@ static int sector_get(lua_State *L)
|
|||
case sector_lightlevel:
|
||||
lua_pushinteger(L, sector->lightlevel);
|
||||
return 1;
|
||||
case sector_floorlightlevel:
|
||||
lua_pushinteger(L, sector->floorlightlevel);
|
||||
return 1;
|
||||
case sector_floorlightabsolute:
|
||||
lua_pushboolean(L, sector->floorlightabsolute);
|
||||
return 1;
|
||||
case sector_ceilinglightlevel:
|
||||
lua_pushinteger(L, sector->ceilinglightlevel);
|
||||
return 1;
|
||||
case sector_ceilinglightabsolute:
|
||||
lua_pushboolean(L, sector->ceilinglightabsolute);
|
||||
return 1;
|
||||
case sector_special:
|
||||
lua_pushinteger(L, sector->special);
|
||||
return 1;
|
||||
|
@ -695,6 +715,18 @@ static int sector_set(lua_State *L)
|
|||
case sector_lightlevel:
|
||||
sector->lightlevel = (INT16)luaL_checkinteger(L, 3);
|
||||
break;
|
||||
case sector_floorlightlevel:
|
||||
sector->floorlightlevel = (INT16)luaL_checkinteger(L, 3);
|
||||
break;
|
||||
case sector_floorlightabsolute:
|
||||
sector->floorlightabsolute = luaL_checkboolean(L, 3);
|
||||
break;
|
||||
case sector_ceilinglightlevel:
|
||||
sector->ceilinglightlevel = (INT16)luaL_checkinteger(L, 3);
|
||||
break;
|
||||
case sector_ceilinglightabsolute:
|
||||
sector->ceilinglightabsolute = luaL_checkboolean(L, 3);
|
||||
break;
|
||||
case sector_special:
|
||||
sector->special = (INT16)luaL_checkinteger(L, 3);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue