minetest/games/devtest/mods/experimental/lighting.lua
x2048 0f25fa7af6
Add API to control shadow intensity from the game/mod (#11944)
* Also Disable shadows when sun/moon is hidden. Fixes #11972.
2022-03-26 16:58:26 +01:00

8 lines
330 B
Lua

core.register_chatcommand("set_lighting", {
params = "shadow_intensity",
description = "Set lighting parameters.",
func = function(player_name, param)
local shadow_intensity = tonumber(param)
minetest.get_player_by_name(player_name):set_lighting({shadows = { intensity = shadow_intensity} })
end
})