revert commit 7a702f0
(add stacking function for scaffolding mod) - it is no longer needed
parent
1c141cdeed
commit
3fc62f4c8e
|
@ -1,40 +0,0 @@
|
|||
--[[ Nodestacking function by https://github.com/minetest-mods/gloopblocks ]]
|
||||
|
||||
local nodes={"scaffolding:reinforced_iron_scaffolding",
|
||||
"scaffolding:iron_scaffolding",
|
||||
"scaffolding:scaffolding",
|
||||
"scaffolding:reinforced_scaffolding"
|
||||
}
|
||||
|
||||
for i = 1, 4 do
|
||||
local nodes = nodes[i]
|
||||
minetest.override_item(nodes, {
|
||||
on_rightclick = function(pos, node, clicker, itemstack)
|
||||
if itemstack and itemstack:get_name() == node.name then
|
||||
for i = 1,19 do
|
||||
if minetest.get_node({x=pos.x,z=pos.z}).name == nodes and scafffound ~= 0 and scafffound ~= 1 then
|
||||
local scafffound = 1
|
||||
return itemstack
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
for i = 1,19 do
|
||||
if minetest.get_node({x=pos.x,y=pos.y+i,z=pos.z}).name == "air" and scaffworked ~= 1 and scaffworked ~= 0 then
|
||||
minetest.set_node({x=pos.x,y=pos.y+i,z=pos.z}, {name=nodes})
|
||||
local scaffworked = 1
|
||||
return ItemStack(tostring(itemstack:get_name().." "..tostring(itemstack:get_count()-1)))
|
||||
elseif minetest.get_node({x=pos.x,y=pos.y+i,z=pos.z}).name == nodes then
|
||||
else
|
||||
local scaffworked = 0
|
||||
end
|
||||
end
|
||||
if scaffworked == 1 then
|
||||
return ItemStack(tostring(itemstack:get_name().." "..tostring(itemstack:get_count()-1)))
|
||||
else
|
||||
return itemstack
|
||||
end
|
||||
else return itemstack end
|
||||
end,
|
||||
})
|
||||
end
|
1
init.lua
1
init.lua
|
@ -5,7 +5,6 @@ dofile(minetest.get_modpath("illuna").."/crafting.lua")
|
|||
dofile(minetest.get_modpath("illuna").."/commands.lua")
|
||||
dofile(minetest.get_modpath("illuna").."/register.lua")
|
||||
dofile(minetest.get_modpath("illuna").."/aliases.lua")
|
||||
dofile(minetest.get_modpath("illuna").."/functions.lua")
|
||||
dofile(minetest.get_modpath("illuna").."/craftitems.lua")
|
||||
dofile(minetest.get_modpath("illuna").."/shop.lua")
|
||||
dofile(minetest.get_modpath("illuna").."/stairs.lua")
|
||||
|
|
Loading…
Reference in New Issue