1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-16 18:01:40 +00:00

Allow saturation to be controlled by the server. (#13075)

This commit is contained in:
lhofhansl 2022-12-25 16:15:32 -08:00 committed by GitHub
parent afd5caa26a
commit 1e7804aaf6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 23 additions and 16 deletions

View file

@ -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
})