mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
Object properties: Add 'glow', disables light's effect if negative
The 'glow' value is added to the ambient light value. Negative 'glow' disables light's effect on object colour, for faking self-lighting, UI-style entities, or programmatic colouring in mods.
This commit is contained in:
@@ -426,6 +426,19 @@ bool getintfield(lua_State *L, int table,
|
||||
return got;
|
||||
}
|
||||
|
||||
bool getintfield(lua_State *L, int table,
|
||||
const char *fieldname, s8 &result)
|
||||
{
|
||||
lua_getfield(L, table, fieldname);
|
||||
bool got = false;
|
||||
if (lua_isnumber(L, -1)) {
|
||||
result = lua_tointeger(L, -1);
|
||||
got = true;
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
return got;
|
||||
}
|
||||
|
||||
bool getintfield(lua_State *L, int table,
|
||||
const char *fieldname, u16 &result)
|
||||
{
|
||||
|
Reference in New Issue
Block a user