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