1
0
mirror of https://bitbucket.org/Infinatum/scaffolding.git synced 2024-11-14 14:20:30 +01:00
scaffolding/functions.lua
Infinatum 2ec270e1a1 Added Function to scaffolding
wooden platform can be used on iron scaffolding
Cleaned Up Code
2017-01-11 17:58:37 -01:00

40 lines
1008 B
Lua

-- falling nodes go into pocket --
function default.dig_horx(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_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