mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00: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:
parent
604fe2083d
commit
a9d43a0471
9 changed files with 52 additions and 20 deletions
|
@ -277,6 +277,7 @@ void read_object_properties(lua_State *L, int index,
|
|||
}
|
||||
lua_pop(L, 1);
|
||||
getboolfield(L, -1, "backface_culling", prop->backface_culling);
|
||||
getintfield(L, -1, "glow", prop->glow);
|
||||
|
||||
getstringfield(L, -1, "nametag", prop->nametag);
|
||||
lua_getfield(L, -1, "nametag_color");
|
||||
|
@ -362,6 +363,8 @@ void push_object_properties(lua_State *L, ObjectProperties *prop)
|
|||
lua_setfield(L, -2, "automatic_face_movement_dir");
|
||||
lua_pushboolean(L, prop->backface_culling);
|
||||
lua_setfield(L, -2, "backface_culling");
|
||||
lua_pushnumber(L, prop->glow);
|
||||
lua_setfield(L, -2, "glow");
|
||||
lua_pushlstring(L, prop->nametag.c_str(), prop->nametag.size());
|
||||
lua_setfield(L, -2, "nametag");
|
||||
push_ARGB8(L, prop->nametag_color);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue