mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-12-24 22:52:24 +01:00
Fix shadowing error
This commit is contained in:
parent
3f48832fff
commit
f7d4c5c6ac
@ -21,17 +21,17 @@ function worldeditadditions.wire_box(pos1,pos2,node)
|
|||||||
local counts = { replaced = 0 }
|
local counts = { replaced = 0 }
|
||||||
|
|
||||||
for z = ps1.z,ps2.z do
|
for z = ps1.z,ps2.z do
|
||||||
for k,y in pairs({pos1.y,pos2.y}) do
|
for _j,y in pairs({pos1.y,pos2.y}) do
|
||||||
for k,x in pairs({pos1.x,pos2.x}) do
|
for _k,x in pairs({pos1.x,pos2.x}) do
|
||||||
data[area:index(x, y, z)] = node_id_replace
|
data[area:index(x, y, z)] = node_id_replace
|
||||||
counts.replaced = counts.replaced + 1
|
counts.replaced = counts.replaced + 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if math.abs(ps2.y-ps1.y) > 1 then
|
if math.abs(ps2.y-ps1.y) > 1 then
|
||||||
for k,z in pairs({pos1.z,pos2.z}) do
|
for _j,z in pairs({pos1.z,pos2.z}) do
|
||||||
for y = pos1.y+1,pos2.y-1 do
|
for y = pos1.y+1,pos2.y-1 do
|
||||||
for k,x in pairs({pos1.x,pos2.x}) do
|
for _k,x in pairs({pos1.x,pos2.x}) do
|
||||||
data[area:index(x, y, z)] = node_id_replace
|
data[area:index(x, y, z)] = node_id_replace
|
||||||
counts.replaced = counts.replaced + 1
|
counts.replaced = counts.replaced + 1
|
||||||
end
|
end
|
||||||
@ -39,8 +39,8 @@ function worldeditadditions.wire_box(pos1,pos2,node)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
if math.abs(ps2.x-ps1.x) > 1 then
|
if math.abs(ps2.x-ps1.x) > 1 then
|
||||||
for k,z in pairs({pos1.z,pos2.z}) do
|
for _j,z in pairs({pos1.z,pos2.z}) do
|
||||||
for k,y in pairs({pos1.y,pos2.y}) do
|
for _k,y in pairs({pos1.y,pos2.y}) do
|
||||||
for x = pos1.x+1,pos2.x-1 do
|
for x = pos1.x+1,pos2.x-1 do
|
||||||
data[area:index(x, y, z)] = node_id_replace
|
data[area:index(x, y, z)] = node_id_replace
|
||||||
counts.replaced = counts.replaced + 1
|
counts.replaced = counts.replaced + 1
|
||||||
|
Loading…
Reference in New Issue
Block a user