change registering crafting recipes in UI

This commit is contained in:
RealBadAngel 2013-04-15 07:56:31 +02:00
parent 3d8b2a365d
commit 41af016603
2 changed files with 8 additions and 11 deletions

@ -19,14 +19,12 @@ alloy_recipes[registered_recipes_count].src2_count=count1
alloy_recipes[registered_recipes_count].dst_name=string3 alloy_recipes[registered_recipes_count].dst_name=string3
alloy_recipes[registered_recipes_count].dst_count=count3 alloy_recipes[registered_recipes_count].dst_count=count3
registered_recipes_count=registered_recipes_count+1 registered_recipes_count=registered_recipes_count+1
if UI_recipes_hook then if unified_inventory then
minetest.register_craft({ unified_inventory.register_craft({
type = "alloy", type = "alloy",
output = string3.." "..count3, output = string3.." "..count3,
recipe = { items = {string1.." "..count1,string2.." "..count2},
{string1.." "..count1}, width = 2,
{string2.." "..count2},
}
}) })
end end
end end

@ -7,11 +7,12 @@ grinder_recipes[registered_grinder_recipes_count]={}
grinder_recipes[registered_grinder_recipes_count].src_name=string1 grinder_recipes[registered_grinder_recipes_count].src_name=string1
grinder_recipes[registered_grinder_recipes_count].dst_name=string2 grinder_recipes[registered_grinder_recipes_count].dst_name=string2
registered_grinder_recipes_count=registered_grinder_recipes_count+1 registered_grinder_recipes_count=registered_grinder_recipes_count+1
if UI_recipes_hook then if unified_inventory then
minetest.register_craft({ unified_inventory.register_craft({
type = "grinding", type = "grinding",
output = string2, output = string2,
recipe = string1, items = {string1},
width = 0,
}) })
end end
end end
@ -22,11 +23,9 @@ register_grinder_recipe("default:gravel","default:dirt")
register_grinder_recipe("default:desert_stone","default:desert_sand") register_grinder_recipe("default:desert_stone","default:desert_sand")
register_grinder_recipe("default:iron_lump","technic:iron_dust 2") register_grinder_recipe("default:iron_lump","technic:iron_dust 2")
register_grinder_recipe("default:coal_lump","technic:coal_dust 2") register_grinder_recipe("default:coal_lump","technic:coal_dust 2")
register_grinder_recipe("moreores:copper_lump","technic:copper_dust 2")
register_grinder_recipe("default:copper_lump","technic:copper_dust 2") register_grinder_recipe("default:copper_lump","technic:copper_dust 2")
register_grinder_recipe("moreores:tin_lump","technic:tin_dust 2") register_grinder_recipe("moreores:tin_lump","technic:tin_dust 2")
register_grinder_recipe("moreores:silver_lump","technic:silver_dust 2") register_grinder_recipe("moreores:silver_lump","technic:silver_dust 2")
register_grinder_recipe("moreores:gold_lump","technic:gold_dust 2")
register_grinder_recipe("default:gold_lump","technic:gold_dust 2") register_grinder_recipe("default:gold_lump","technic:gold_dust 2")
register_grinder_recipe("moreores:mithril_lump","technic:mithril_dust 2") register_grinder_recipe("moreores:mithril_lump","technic:mithril_dust 2")
register_grinder_recipe("technic:chromium_lump","technic:chromium_dust 2") register_grinder_recipe("technic:chromium_lump","technic:chromium_dust 2")