From 4d94ad9c16d262259f22ef84147b6b4edb0ba42f Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Thu, 30 May 2019 06:05:20 -0400 Subject: [PATCH] fix wrong survival-mode digiline-wires-needed count fix drops on digilines conducting fences --- simple.lua | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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