walltool: optimize placement
This commit is contained in:
parent
b097b98be4
commit
3ca52fb0c0
@ -152,18 +152,17 @@ scaffold.register_template_scaffold("WallTool", "scaffold_walltool", function(po
|
||||
local i=1
|
||||
local nds=minetest.find_nodes_near(lp,10,{'air'})
|
||||
for k,vv in pairs(nds) do
|
||||
if i > 8 then return end
|
||||
local iwn=iwall_node(vv)
|
||||
local nd=minetest.get_node_or_nil(vv)
|
||||
if vv and in_wall(vv) then
|
||||
if i > 8 then return end
|
||||
i = i + 1
|
||||
local nd=minetest.get_node_or_nil(vv)
|
||||
if nd and nd.name ~= 'air' then
|
||||
scaffold.dig(vv)
|
||||
else
|
||||
ws.place(vv,{cobble})
|
||||
end
|
||||
elseif vv and iwn then
|
||||
if i > 8 then return end
|
||||
i = i + 1
|
||||
if nd and nd.name ~= iwn and nd.name ~= 'air' then
|
||||
ws.dig(vv)
|
||||
|
Loading…
x
Reference in New Issue
Block a user