diff options
| author | lhofhansl <larsh@apache.org> | 2022-12-25 16:15:32 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-25 16:15:32 -0800 |
| commit | 1e7804aaf66e2c2a81f81267923621dea17cb274 (patch) | |
| tree | 15de0319b559a7679659d66b2b389d71e97352b6 /games | |
| parent | afd5caa26a2352c912e1a1976b59e1f89773cdec (diff) | |
| download | minetest-1e7804aaf66e2c2a81f81267923621dea17cb274.tar.xz | |
Allow saturation to be controlled by the server. (#13075)
Diffstat (limited to 'games')
| -rw-r--r-- | games/devtest/mods/util_commands/init.lua | 9 |
1 files changed, 9 insertions, 0 deletions
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 = "<saturation>", + 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 +}) |
