summaryrefslogtreecommitdiff
path: root/games/devtest/mods/util_commands/init.lua
diff options
context:
space:
mode:
Diffstat (limited to 'games/devtest/mods/util_commands/init.lua')
-rw-r--r--games/devtest/mods/util_commands/init.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/games/devtest/mods/util_commands/init.lua b/games/devtest/mods/util_commands/init.lua
index 9be989e67..c37364042 100644
--- a/games/devtest/mods/util_commands/init.lua
+++ b/games/devtest/mods/util_commands/init.lua
@@ -293,3 +293,17 @@ minetest.register_chatcommand("dump_item", {
return true, str
end,
})
+
+-- shadow control
+minetest.register_on_joinplayer(function (player)
+ player:set_lighting({shadows={intensity = 0.33}})
+end)
+
+core.register_chatcommand("set_shadow", {
+ params = "<shadow_intensity>",
+ description = "Set shadow parameters of current player.",
+ func = function(player_name, param)
+ local shadow_intensity = tonumber(param)
+ minetest.get_player_by_name(player_name):set_lighting({shadows = { intensity = shadow_intensity} })
+ end
+})