Worktable : get rid of useless set_stack

This commit is contained in:
kilbith 2016-01-05 18:10:51 +01:00
parent c514fe233e
commit 30424d9ff3

View File

@ -103,7 +103,7 @@ function worktable.craft_output_recipe(pos, start_i, pagenum, stackname, recipe_
if def:find("wool$") or def:find("dye$") then if def:find("wool$") or def:find("dye$") then
def = def:match(":([%w_]+)")..":white" def = def:match(":([%w_]+)")..":white"
elseif minetest.registered_items["default:"..def:match("^group:([%w_,]+)$")] then elseif minetest.registered_items["default:"..def:match("^group:([%w_,]+)$")] then
def = def:gsub("group", "default") def = def:gsub("group:", "default:")
else else
for node, definition in pairs(minetest.registered_items) do for node, definition in pairs(minetest.registered_items) do
for group in pairs(definition.groups) do for group in pairs(definition.groups) do
@ -338,10 +338,6 @@ function worktable.move(pos, from_list, from_index, to_list, to_index, count, _)
local start_i = tonumber(formspec:match("inv_items_list;.*;(%d+)%]")) or 0 local start_i = tonumber(formspec:match("inv_items_list;.*;(%d+)%]")) or 0
worktable.craft_output_recipe(pos, start_i, start_i / (8*4) + 1, stackname, 1, filter) worktable.craft_output_recipe(pos, start_i, start_i / (8*4) + 1, stackname, 1, filter)
minetest.after(0, function()
inv:set_stack(from_list, from_index, stackname)
end)
end end
return 0 return 0