fix wrong survival-mode digiline-wires-needed count

fix drops on digilines conducting fences
master
Vanessa Dannenberg 2019-05-30 06:05:20 -04:00
parent 333a65785a
commit 4d94ad9c16
1 changed files with 8 additions and 3 deletions

View File

@ -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