mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
Lua API: Document shader dependencies of set_lighting() (#13079)
This commit is contained in:
@@ -2294,10 +2294,10 @@ int ObjectRef::l_set_lighting(lua_State *L)
|
||||
Lighting lighting = player->getLighting();
|
||||
lua_getfield(L, 2, "shadows");
|
||||
if (lua_istable(L, -1)) {
|
||||
lighting.shadow_intensity = getfloatfield_default(L, -1, "intensity", lighting.shadow_intensity);
|
||||
getfloatfield(L, -1, "intensity", lighting.shadow_intensity);
|
||||
}
|
||||
lighting.saturation = getfloatfield_default(L, 2, "saturation", lighting.saturation);
|
||||
lua_pop(L, -1);
|
||||
lua_pop(L, 1); // shadows
|
||||
getfloatfield(L, -1, "saturation", lighting.saturation);
|
||||
|
||||
getServer(L)->setLighting(player, lighting);
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user