description="Applies a sculpting brush to the terrain with a given height. See //sculptlist to list all available brushes. Note that while the brush size is configurable, the actual brush size you end up with may be slightly different to that which you request due to brush size restrictions.",
privs={worldedit=true},
require_pos=1,
parse=function(params_text)
ifnotparams_textorparams_text==""then
params_text="default"
end
localparts=wea.split_shell(params_text)
localbrush_name="default"
localheight=5
localbrush_size=10
if#parts>=1then
brush_name=table.remove(parts,1)
ifnotwea.sculpt.brushes[brush_name]then
returnfalse,"A brush with the name '"..brush_name.."' doesn't exist. Try using //sculptlist to list all available brushes."
end
end
if#parts>=1then
height=tonumber(table.remove(parts,1))
ifnotheightthen
returnfalse,"Invalid height value (must be an integer - negative values lower terrain instead of raising it)"
end
end
if#parts>=1then
brush_size=tonumber(table.remove(parts,1))
ifnotbrush_sizeorbrush_size<1then
returnfalse,"Invalid brush size. Brush sizes must be a positive integer."
minetest.log("action",name.." used //sculpt at "..pos1..", adding "..stats.added.." nodes and removing "..stats.removed.." nodes in "..time_taken.."s")
returntrue,stats.added.." nodes added and "..stats.removed.." removed in "..wea.format.human_time(time_taken)