Fixed duplication bug

This commit is contained in:
TenPlus1 2016-03-24 11:52:51 +00:00
parent 7ead0a45a6
commit 3714132ed0

View File

@ -206,7 +206,7 @@ minetest.register_node("inventory_plus:workbench", {
{ 0.3, -0.5, 0.3, 0.4, 0.4, 0.4 }, { 0.3, -0.5, 0.3, 0.4, 0.4, 0.4 },
{ -0.5, 0.4, -0.5, 0.5, 0.5, 0.5 }, { -0.5, 0.4, -0.5, 0.5, 0.5, 0.5 },
}}, }},
tiles = {"invplus_workbench_top.png","default_wood.png","default_wood.png"}, tiles = {"invplus_workbench_top.png", "default_wood.png", "default_wood.png"},
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
groups = {choppy = 2}, groups = {choppy = 2},
@ -247,6 +247,10 @@ minetest.register_node("inventory_plus:workbench", {
return 0 return 0
end end
if from_list == "dst" and to_list == "table" then
return 0
end
return count return count
end, end,
@ -266,9 +270,6 @@ minetest.register_node("inventory_plus:workbench", {
on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
minetest.node_metadata_inventory_move_allow_all(
pos, from_list, from_index, to_list, to_index, count, player)
if to_list == "table" or from_list == "table" then if to_list == "table" or from_list == "table" then
local inv = minetest.get_meta(pos):get_inventory() local inv = minetest.get_meta(pos):get_inventory()