diff --git a/simple.lua b/simple.lua index 499a204..445f579 100644 --- a/simple.lua +++ b/simple.lua @@ -131,8 +131,8 @@ local function check_and_place(itemstack, placer, pointed_thing, pole, light, pa return end - if needs_digiline_wire and not inv:contains_item("main", digiline_wire_node) then - minetest.chat_send_player(playername, "*** You don't have any digiline wires in your inventory!") + if needs_digiline_wire and not inv:contains_item("main", digiline_wire_node.." 6") then + minetest.chat_send_player(playername, "*** You don't have enough Digiline wires in your inventory!") return end @@ -158,7 +158,7 @@ local function check_and_place(itemstack, placer, pointed_thing, pole, light, pa inv:remove_item("main", light) if needs_digiline_wire then - inv:remove_item("main", digiline_wire_node) + inv:remove_item("main", digiline_wire_node.." 6") end end @@ -239,6 +239,11 @@ for _, pole in ipairs(poles_tab) do } } } + def.drop = { + items = { + {items = { matnode.."_digilines" } }, + } + } minetest.register_node(":"..matnode.."_digilines", def) end