mirror of
https://bitbucket.org/Infinatum/scaffolding.git
synced 2025-01-09 16:40:17 +01:00
Fixed the iron scaffolding
This commit is contained in:
parent
03a2039319
commit
05c1577d4c
@ -79,11 +79,40 @@ end)
|
|||||||
|
|
||||||
-- falling nodes go into pocket --
|
-- falling nodes go into pocket --
|
||||||
|
|
||||||
function default.dig_hor(pos, node, digger)
|
function default.dig_horx(pos, node, digger)
|
||||||
if digger == nil then return end
|
if digger == nil then return end
|
||||||
local np = {x = pos.x, y = pos.y, z = pos.z + 1,}
|
local np = {x = pos.x + 1, y = pos.y, z = pos.z,}
|
||||||
local nn = minetest.get_node(np)
|
local nn = minetest.get_node(np)
|
||||||
if nn.name == node.name then
|
if nn.name == node.name then
|
||||||
minetest.node_dig(np, nn, digger)
|
minetest.node_dig(np, nn, digger)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function default.dig_horx2(pos, node, digger)
|
||||||
|
if digger == nil then return end
|
||||||
|
local np = {x = pos.x - 1, y = pos.y, z = pos.z,}
|
||||||
|
local nn = minetest.get_node(np)
|
||||||
|
if nn.name == node.name then
|
||||||
|
minetest.node_dig(np, nn, digger)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function default.dig_horz(pos, node, digger)
|
||||||
|
if digger == nil then return end
|
||||||
|
local np = {x = pos.x, y = pos.y, z = pos.z + 1,}
|
||||||
|
local nn = minetest.get_node(np)
|
||||||
|
if nn.name == node.name then
|
||||||
|
minetest.node_dig(np, nn, digger)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function default.dig_horz2(pos, node, digger)
|
||||||
|
if digger == nil then return end
|
||||||
|
local np = {x = pos.x , y = pos.y, z = pos.z - 1,}
|
||||||
|
local nn = minetest.get_node(np)
|
||||||
|
if nn.name == node.name then
|
||||||
|
minetest.node_dig(np, nn, digger)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
5
init.lua
5
init.lua
@ -55,7 +55,10 @@ minetest.register_node("scaffolding:iron_scaffolding", {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
after_dig_node = function(pos, node, metadata, digger)
|
after_dig_node = function(pos, node, metadata, digger)
|
||||||
default.dig_hor(pos, node, digger)
|
default.dig_horx(pos, node, digger)
|
||||||
|
default.dig_horx2(pos, node, digger)
|
||||||
|
default.dig_horz(pos, node, digger)
|
||||||
|
default.dig_horz2(pos, node, digger)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user