minetest_mod_weather/weather/command.lua

16 lines
384 B
Lua
Raw Normal View History

2013-03-24 14:40:18 +01:00
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},
2018-04-14 08:07:11 +02:00
func = function(_, param) --name, param
2018-04-11 17:55:27 +02:00
weather.type = param
2013-03-24 14:40:18 +01:00
save_weather()
end
})