Fix unknown instruments' heads

This commit is contained in:
Ilya Zhuravlev 2013-03-10 20:37:06 +04:00
parent 263338ffe3
commit f70a54fa49

View File

@ -83,13 +83,18 @@ local instruments =
} }
for _, instrument in ipairs(instruments) do for _, instrument in ipairs(instruments) do
for i, metal in ipairs(metals.list) do for i, metal in ipairs(metals.list) do
realtest.register_anvil_recipe({ -- the proper way to do that is to check whether we have metal in instruments.metals list or not
item1 = "metals:"..metal..instrument[2], -- but who cares?
item2 = "scribing_table:plan_"..instrument[1], local output_name = "instruments:"..instrument[1].."_"..metal.."_head"
rmitem2 = false, if minetest.registered_items[output_name] then
output = "instruments:"..instrument[1].."_"..metal.."_head", realtest.register_anvil_recipe({
level = metals.levels[i], item1 = "metals:"..metal..instrument[2],
}) item2 = "scribing_table:plan_"..instrument[1],
rmitem2 = false,
output = output_name,
level = metals.levels[i],
})
end
end end
end end