Metals update

Double ingots, sheets, double sheets added. Now buckets must be forged by sheets.
This commit is contained in:
Kotolegokot 2012-10-26 23:46:47 +06:00
parent d446bbd56c
commit fa8b4bd16e
62 changed files with 72 additions and 24 deletions

View File

@ -21,18 +21,34 @@ function realtest.register_anvil_recipe(RecipeDef)
end
end
--Unshaped metals and buckets
--Unshaped metals, buckets, double ingots and sheets
for _, metal in ipairs(METALS_LIST) do
realtest.register_anvil_recipe({
item1 = "metals:"..metal.."_unshaped",
output = "metals:"..metal.."_ingot",
})
realtest.register_anvil_recipe({
item1 = "metals:"..metal.."_ingot",
item1 = "metals:"..metal.."_sheet",
item2 = "metals:recipe_bucket",
rmitem2 = false,
output = "metals:bucket_empty_"..metal,
})
realtest.register_anvil_recipe({
item1 = "metals:"..metal.."_doubleingot",
output = "metals:"..metal.."_sheet",
})
realtest.register_anvil_recipe({
type = "weld",
item1 = "metals:"..metal.."_ingot",
item2 = "metals:"..metal.."_ingot",
output = "metals:"..metal.."_doubleingot",
})
realtest.register_anvil_recipe({
type = "weld",
item1 = "metals:"..metal.."_sheet",
item2 = "metals:"..metal.."_sheet",
output = "metals:"..metal.."_doublesheet",
})
end
--Pig iron --> Wrought iron
realtest.register_anvil_recipe({
@ -191,7 +207,29 @@ minetest.register_node("anvil:self", {
end
end
elseif fields["buttonWeld"] then
if flux:get_name() == "minerals:flux" and table.contains(anvil.hammers, hammer:get_name()) then
for _, recipe in ipairs(realtest.registered_anvil_recipes) do
if recipe.type == "weld" and recipe.item1 == src1:get_name() and recipe.item2 == src2:get_name() then
if inv:room_for_item("output", recipe.output) then
if recipe.rmitem1 then
src1:take_item()
inv:set_stack("src1", 1, src1)
end
if recipe.item2 ~= "" and recipe.rmitem2 then
src2:take_item()
inv:set_stack("src2", 1, src2)
end
output:add_item(recipe.output)
inv:set_stack("output", 1, output)
flux:take_item()
inv:set_stack("flux", 1, flux)
hammer:add_wear(65535/60)
inv:set_stack("hammer", 1, hammer)
end
return
end
end
end
end
end,
})

View File

@ -29,8 +29,8 @@ METALS_LIST={
DESC_LIST={
'Bismuth',
'Pig iron',
'Wrought iron',
'Pig Iron',
'Wrought Iron',
'Steel',
'Gold',
'Nickel',
@ -41,12 +41,12 @@ DESC_LIST={
'Copper',
'Zinc',
'Brass',
'Sterling silver',
'Rose gold',
'Black bronze',
'Bismuth bronze',
'Sterling Silver',
'Rose Gold',
'Black Bronze',
'Bismuth Bronze',
'Bronze',
'Black steel',
'Black Steel',
'Aluminium'
}
@ -84,15 +84,30 @@ for i=1, #METALS_LIST do
--
minetest.register_craftitem("metals:"..METALS_LIST[i].."_unshaped", {
description = "Unshaped "..DESC_SMALL_LIST[i],
description = "Unshaped "..DESC_LIST[i],
inventory_image = "metals_"..METALS_LIST[i].."_unshaped.png",
})
minetest.register_craftitem("metals:"..METALS_LIST[i].."_ingot", {
description = DESC_LIST[i].." ingot",
description = DESC_LIST[i].." Ingot",
inventory_image = "metals_"..METALS_LIST[i].."_ingot.png",
})
minetest.register_craftitem("metals:" .. METALS_LIST[i] .. "_doubleingot", {
description = DESC_LIST[i] .. " Double Ingot",
inventory_image = "metals_" .. METALS_LIST[i] .. "_doubleingot.png",
})
minetest.register_craftitem("metals:" .. METALS_LIST[i] .. "_sheet", {
description = DESC_LIST[i] .. " Sheet",
inventory_image = "metals_" .. METALS_LIST[i] .. "_sheet.png",
})
minetest.register_craftitem("metals:" .. METALS_LIST[i] .. "_doublesheet", {
description = DESC_LIST[i] .. " Double Sheet",
inventory_image = "metals_" .. METALS_LIST[i] .. "_doublesheet.png",
})
minetest.register_craftitem("metals:tool_pick_"..METALS_LIST[i].."_head", {
description =DESC_LIST[i].." pickaxe head",
inventory_image = "metals_tool_pick_"..METALS_LIST[i].."_head.png",
@ -439,13 +454,13 @@ end
--
local recipes = {
{"metals:recipe_pick", "Pick recipe"},
{"metals:recipe_axe", "Axe recipe"},
{"metals:recipe_shovel", "Shovel recipe"},
{"metals:recipe_sword", "Sword recipe"},
{"metals:recipe_hammer", "Hammer recipe"},
{"metals:recipe_spear", "Spear recipe"},
{"metals:recipe_bucket","Bucket recipe"},
{"metals:recipe_pick", "Pick Recipe"},
{"metals:recipe_axe", "Axe Recipe"},
{"metals:recipe_shovel", "Shovel Recipe"},
{"metals:recipe_sword", "Sword Recipe"},
{"metals:recipe_hammer", "Hammer Recipe"},
{"metals:recipe_spear", "Spear Recipe"},
{"metals:recipe_bucket","Bucket Recipe"},
}
for _, recipe in ipairs(recipes) do
@ -512,11 +527,6 @@ minetest.register_craft({
-- Other
--
minetest.register_craftitem(":default:steel_ingot", {
description = "Double wrought ingot",
inventory_image = "metals_wrought_iron_ingot.png",
})
--
-- Entitis

Binary file not shown.

After

Width:  |  Height:  |  Size: 753 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 729 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 731 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 837 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 777 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 550 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 779 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 816 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 580 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 682 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 574 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 380 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 705 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 613 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 408 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 845 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 769 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 554 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 861 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 784 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 573 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 830 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 775 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 554 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 862 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 796 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 607 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 758 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 844 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 584 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 792 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 847 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 590 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 719 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 824 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 567 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 696 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 857 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 600 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 856 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 851 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 602 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 818 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 867 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 626 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 771 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 782 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 527 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 800 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 870 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 633 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 837 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 844 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 604 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 801 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 848 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 583 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 741 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 593 B