weather_pack/weather/command.lua
2016-02-10 22:44:41 +02:00

16 lines
374 B
Lua

minetest.register_privilege("weather", {
description = "Change the weather",
give_to_singleplayer = false
})
-- Set weather
minetest.register_chatcommand("setweather", {
params = "<weather>",
description = "Set weather to rain, snow or none", -- full description
privs = {weather = true},
func = function(name, param)
weather.state = param
save_weather()
end
})