From 1e7804aaf66e2c2a81f81267923621dea17cb274 Mon Sep 17 00:00:00 2001 From: lhofhansl Date: Sun, 25 Dec 2022 16:15:32 -0800 Subject: Allow saturation to be controlled by the server. (#13075) --- games/devtest/mods/util_commands/init.lua | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'games/devtest/mods') diff --git a/games/devtest/mods/util_commands/init.lua b/games/devtest/mods/util_commands/init.lua index 8d12d27f0..4702cc556 100644 --- a/games/devtest/mods/util_commands/init.lua +++ b/games/devtest/mods/util_commands/init.lua @@ -223,3 +223,12 @@ core.register_chatcommand("set_shadow", { minetest.get_player_by_name(player_name):set_lighting({shadows = { intensity = shadow_intensity} }) end }) + +core.register_chatcommand("set_saturation", { + params = "", + description = "Set the saturation for current player.", + func = function(player_name, param) + local saturation = tonumber(param) + minetest.get_player_by_name(player_name):set_lighting({saturation = saturation }) + end +}) -- cgit v1.2.3