diff --git a/cooking.lua b/cooking.lua index d8960a3..fe99134 100644 --- a/cooking.lua +++ b/cooking.lua @@ -110,12 +110,13 @@ minetest.register_abm({ local ingredients = {} local ingredients_list = { -- Add more ingredients here that make a soup. - "apple", "mushroom", "honey", "pumpkin" + "apple", "mushroom", "honey", "pumpkin", "egg", "bread", + "meat", "chicken" } for _, obj in pairs(objs) do if obj and obj:get_luaentity() then - local itemstring = obj:get_luaentity().itemstring:match("([%w_:]+)%s") + local itemstring = obj:get_luaentity().itemstring:match("[%w_]+:([%w_]+)") for _, ing in pairs(ingredients_list) do if itemstring and itemstring:match(ing) and not minetest.serialize(ingredients):find(itemstring) then diff --git a/enchanting.lua b/enchanting.lua index 06ef1fe..755e901 100644 --- a/enchanting.lua +++ b/enchanting.lua @@ -79,7 +79,7 @@ function enchanting.dig(pos, _) end local function allowed(tool) - for item, _ in pairs(minetest.registered_tools) do + for item in pairs(minetest.registered_tools) do if item:match("enchanted_"..tool) then return true end diff --git a/worktable.lua b/worktable.lua index d58eca2..f9946cf 100644 --- a/worktable.lua +++ b/worktable.lua @@ -177,7 +177,7 @@ function worktable.craftguide_update(pos, filter) if not (def.groups.not_in_creative_inventory == 1) and minetest.get_craft_recipe(name).items and def.description and def.description ~= "" and - ((filter and def.name:find(filter, 1, true)) or not filter) then + (not filter or def.name:find(filter, 1, true)) then inv_items_list[#inv_items_list+1] = name end end