Bare minimum: setting your own height
parent
c04ea822ab
commit
3b08809e90
22
init.lua
22
init.lua
|
@ -27,3 +27,25 @@ USA
|
|||
|
||||
]]
|
||||
|
||||
minetest.register_chatcommand("clouds", {
|
||||
params = "[height <height>]",
|
||||
description = "Control cloud appearance",
|
||||
func = function(caller, param)
|
||||
|
||||
-- guaranteed to exist?
|
||||
local player = minetest.get_player_by_name(caller)
|
||||
|
||||
param = param:trim()
|
||||
-- bare minimum: setting your own height
|
||||
local height = string.match(param, 'height +(%d+)')
|
||||
if height then
|
||||
player:set_clouds({
|
||||
height = height,
|
||||
})
|
||||
|
||||
return true, "Clouds height set to " .. height
|
||||
else
|
||||
return false, "Invalid usage, see /help clouds"
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue