add /biome chatcommand (weather priv)

This commit is contained in:
cora 2021-09-27 02:32:43 +02:00
parent f98058a853
commit 5e8d8a7e9b
1 changed files with 12 additions and 0 deletions

View File

@ -326,6 +326,18 @@ minetest.register_chatcommand("weather", {
end
})
minetest.register_chatcommand("biome", {
params = "",
description = S("Gets current biome"),
privs = {weather_manager = true},
func = function(name)
local player=minetest.get_player_by_name(name)
local biome=minetest.get_biome_data(player:get_pos())
local bname = minetest.get_biome_name(biome.biome)
minetest.chat_send_player(name,bname.. " " ..dump(biome))
end
})
minetest.register_chatcommand("toggledownfall", {
params = "",
description = S("Toggles between clear weather and weather with downfall (randomly rain, thunderstorm or snow)"),