Drop some node aliases

This commit is contained in:
kilbith 2016-01-13 18:17:38 +01:00
parent 63949950bd
commit 31058c914e
3 changed files with 7 additions and 10 deletions

View File

@ -1,5 +1,3 @@
minetest.register_alias("xdecor:cauldron", "xdecor:cauldron_empty") -- legacy code
local cauldron_cbox = { local cauldron_cbox = {
type = "fixed", type = "fixed",
fixed = { fixed = {

View File

@ -344,8 +344,6 @@ xdecor.register("painting_1", {
end end
}) })
minetest.register_alias("xdecor:painting", "xdecor:painting_1") -- legacy code
for i = 2, 4 do for i = 2, 4 do
xdecor.register("painting_"..i, { xdecor.register("painting_"..i, {
tiles = {"xdecor_painting_"..i..".png"}, tiles = {"xdecor_painting_"..i..".png"},

View File

@ -38,8 +38,8 @@ function worktable.get_recipe(item)
elseif minetest.registered_items["default:"..item:sub(7)] then elseif minetest.registered_items["default:"..item:sub(7)] then
item = item:gsub("group:", "default:") item = item:gsub("group:", "default:")
else else
for node, definition in pairs(minetest.registered_items) do for node, def in pairs(minetest.registered_items) do
if definition.groups[item:match("[^,:]+$")] then if def.groups[item:match("[^,:]+$")] then
item = node item = node
end end
end end
@ -128,7 +128,8 @@ local function tab_category(tab_id)
minetest.registered_items, minetest.registered_items,
minetest.registered_nodes, minetest.registered_nodes,
minetest.registered_tools, minetest.registered_tools,
minetest.registered_craftitems } minetest.registered_craftitems
}
return id_category[tab_id] or id_category[1] return id_category[tab_id] or id_category[1]
end end
@ -294,10 +295,10 @@ function worktable.put(pos, listname, _, stack)
return 0 return 0
end end
function worktable.take(pos, listname, _, stack, player) function worktable.take(_, listname, _, stack, player)
if listname == "forms" then if listname == "forms" then
local user_inv = player:get_inventory() local inv = player:get_inventory()
if user_inv:room_for_item("main", stack:get_name()) then if inv:room_for_item("main", stack:get_name()) then
return -1 return -1
end end
return 0 return 0