Fix some code identation

This commit is contained in:
Peppy 2018-11-03 12:40:47 +01:00
parent 9d6c62f8d5
commit 68b2d13365
2 changed files with 40 additions and 40 deletions

View File

@ -34,35 +34,35 @@ function axinitium.get_3x3s(pos, digger)
local c = 1
for x=-1,1 do
for y=-1,1 do
if x ~= 0 or y ~= 0 then
-- determine next perpendicular node
local k = {x=0, y=0, z=0}
if a > 0 then
k.z = pos.z + x
if b > 0 then
k.x = pos.x + y
k.y = pos.y
for y=-1,1 do
if x ~= 0 or y ~= 0 then
-- determine next perpendicular node
local k = {x=0, y=0, z=0}
if a > 0 then
k.z = pos.z + x
if b > 0 then
k.x = pos.x + y
k.y = pos.y
else
k.x = pos.x
k.y = pos.y + y
end
else
k.x = pos.x
k.y = pos.y + y
k.x = pos.x + x
if b > 0 then
k.y = pos.y
k.z = pos.z + y
else
k.y = pos.y + y
k.z = pos.z
end
end
else
k.x = pos.x + x
if b > 0 then
k.y = pos.y
k.z = pos.z + y
else
k.y = pos.y + y
k.z = pos.z
end
end
r[c] = {x=k.x, y=k.y, z=k.z}
c = c + 1
r[c] = {x=k.x, y=k.y, z=k.z}
c = c + 1
end
end
end
end
return r
end
@ -92,16 +92,16 @@ function axinitium.get_chopped(pos, group)
-- 3x3s upward till we run out of tree
for x=-1,1 do
for z=-1,1 do
p.x = pos.x + x
p.z = pos.z + z
if minetest.get_item_group(minetest.get_node(p).name, group) > 0 then
b = 0
r[c] = {x=p.x, y=p.y, z=p.z}
c = c + 1
for z=-1,1 do
p.x = pos.x + x
p.z = pos.z + z
if minetest.get_item_group(minetest.get_node(p).name, group) > 0 then
b = 0
r[c] = {x=p.x, y=p.y, z=p.z}
c = c + 1
end
end
end
end
end
return r
end

View File

@ -6,15 +6,15 @@ minetest.register_tool("axinitium:pickaxe", {
groups = {pick=2},
inventory_image = "pickaxe.png",
range = 8,
tool_capabilities = {
full_punch_interval = 0.9,
max_drop_level=3,
groupcaps={
cracky = {times={[1]=2.0, [2]=1.0, [3]=0.50}, uses=50, maxlevel=3},
},
damage_groups = {fleshy=5},
tool_capabilities = {
full_punch_interval = 0.9,
max_drop_level=3,
groupcaps={
cracky = {times={[1]=2.0, [2]=1.0, [3]=0.50}, uses=50, maxlevel=3},
},
})
damage_groups = {fleshy=5},
},
})
--Register Axinite Axe
minetest.register_tool("axinitium:axe", {