diff --git a/clientmods/scaffold/wallbot.lua b/clientmods/scaffold/wallbot.lua index 05973768c..0cba876f3 100644 --- a/clientmods/scaffold/wallbot.lua +++ b/clientmods/scaffold/wallbot.lua @@ -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)