minetest-i4/i4/tests/test_custom_recipes.lua

339 lines
4.6 KiB
Lua
Raw Permalink Normal View History

local mt = ItemStack("default:wood")
mt:get_meta():set_string("description", "test wood")
mt:get_meta():set_string("color", "green")
local mt2 = ItemStack("dye:red")
mt2:get_meta():set_string("description", "test red")
mt2:get_meta():set_string("color", "#ff0")
2021-11-21 11:44:49 -06:00
local mt3 = ItemStack("default:pick_diamond")
mt3:get_meta():set_string("description", "Worn Pick")
2021-11-22 10:37:28 -06:00
mt3:get_meta():set_string("color", "yellow")
2021-11-21 11:44:49 -06:00
mt3:set_wear(10000)
2022-09-04 12:12:57 -05:00
minetest.register_craft {
output = mt:to_string(),
2021-04-06 11:09:24 -05:00
type = "shapeless",
recipe = {
"default:wood",
mt2:to_string(),
2021-04-06 11:09:24 -05:00
},
2022-09-04 12:12:57 -05:00
}
2021-04-06 11:09:24 -05:00
2022-09-04 12:12:57 -05:00
minetest.register_craft {
2021-11-21 11:44:49 -06:00
output = mt3:to_string(),
type = "shapeless",
recipe = {
"default:pick_mese",
"default:diamond",
},
2022-09-04 12:12:57 -05:00
}
minetest.clear_craft {
recipe = {
{"default:sand", "default:sand"},
{"default:sand", "default:sand"},
},
}
2021-11-21 11:44:49 -06:00
2021-10-31 09:03:47 -05:00
i3.register_craft {
url = "https://raw.githubusercontent.com/minetest-mods/i3/main/tests/test_online_recipe.json"
}
2022-09-04 12:12:57 -05:00
i3.register_craft {
result = "default:ladder_wood 2",
items = {"default:copper_ingot 7, default:tin_ingot, default:steel_ingot 2"},
2022-09-04 12:12:57 -05:00
}
2021-12-23 17:36:13 -06:00
i3.register_craft {
result = "default:tree",
items = {
"default:wood",
"",
"default:wood"
},
}
i3.register_craft {
result = "default:cobble 16",
items = {
"default:stone, default:stone",
"default:stone, , default:stone",
", default:stone, default:stone",
}
}
2022-09-04 12:12:57 -05:00
i3.register_craft {
grid = {
"X",
"#",
"X",
"X",
},
key = {
['#'] = "default:wood",
['X'] = "default:glass 2",
},
result = "default:mese 3",
2022-09-04 12:12:57 -05:00
}
2022-09-04 12:12:57 -05:00
i3.register_craft {
grid = {
"X",
"#X",
"X",
"X",
},
key = {
['#'] = "default:wood",
['X'] = "default:glass 2",
},
result = "default:mese 3",
2022-09-04 12:12:57 -05:00
}
2022-09-04 12:12:57 -05:00
i3.register_craft {
grid = {
"X",
},
key = {
['#'] = "default:wood",
['X'] = "default:glass 2",
},
result = "default:mese 3",
2022-09-04 12:12:57 -05:00
}
2022-09-04 12:12:57 -05:00
i3.register_craft {
grid = {
"X#",
},
key = {
['#'] = "default:wood",
['X'] = "default:glass 2",
},
result = "default:mese 3",
2022-09-04 12:12:57 -05:00
}
2022-09-04 12:12:57 -05:00
i3.register_craft {
grid = {
"X#X",
},
key = {
['#'] = "default:wood",
['X'] = "default:glass 2",
},
result = "default:mese 3",
2022-09-04 12:12:57 -05:00
}
2022-09-04 12:12:57 -05:00
i3.register_craft {
grid = {
"X#XX",
},
key = {
['#'] = "default:wood",
['X'] = "default:glass 2",
},
result = "default:mese 3",
2022-09-04 12:12:57 -05:00
}
2022-09-04 12:12:57 -05:00
i3.register_craft {
grid = {
"X#XX",
"X#X",
},
key = {
['#'] = "default:wood",
['X'] = "default:glass 2",
},
result = "default:mese 3",
2022-09-04 12:12:57 -05:00
}
2022-09-04 12:12:57 -05:00
i3.register_craft {
grid = {
"X#XX",
"X#X",
"#",
},
key = {
['#'] = "default:wood",
['X'] = "default:glass 2",
},
result = "default:mese 3",
2022-09-04 12:12:57 -05:00
}
2022-09-04 12:12:57 -05:00
i3.register_craft {
grid = {
"X##XX",
},
key = {
['#'] = "default:wood",
['X'] = "default:glass 2",
},
result = "default:mese 3",
2022-09-04 12:12:57 -05:00
}
2022-09-04 12:12:57 -05:00
i3.register_craft {
grid = {
"X##X#X",
},
key = {
['#'] = "default:wood",
['X'] = "default:glass 2",
},
result = "default:mese 3",
2022-09-04 12:12:57 -05:00
}
2022-09-04 12:12:57 -05:00
i3.register_craft {
grid = {
"X##X#X",
"",
"X",
},
key = {
['#'] = "default:wood",
['X'] = "default:glass 2",
},
result = "default:mese 3",
2022-09-04 12:12:57 -05:00
}
2022-09-04 12:12:57 -05:00
i3.register_craft {
2021-01-16 12:47:34 -06:00
grid = {
"X #",
" ## ",
"X#X#",
"X X",
},
key = {
['#'] = "default:wood",
2021-03-26 17:34:29 -05:00
['X'] = "default:glass 2",
2021-01-16 12:47:34 -06:00
},
result = "default:mese 3",
2022-09-04 12:12:57 -05:00
}
2021-01-16 12:47:34 -06:00
2022-09-04 12:12:57 -05:00
i3.register_craft {
2021-01-16 12:47:34 -06:00
grid = {
"X #",
" ## ",
"X#X#X",
"X X",
},
key = {
['#'] = "default:wood",
['X'] = "default:glass",
},
result = "default:mese 3",
2022-09-04 12:12:57 -05:00
}
2021-01-16 12:47:34 -06:00
2022-09-04 12:12:57 -05:00
i3.register_craft {
2021-01-16 12:47:34 -06:00
grid = {
"X #",
" ## ",
"X#X#",
"#X#X#",
"X X",
},
key = {
['#'] = "default:wood",
['X'] = "default:glass",
},
result = "default:mese 3",
2022-09-04 12:12:57 -05:00
}
2021-01-16 12:47:34 -06:00
2022-09-04 12:12:57 -05:00
i3.register_craft {
2021-01-16 12:47:34 -06:00
grid = {
"X #",
" ## ",
"X#X#",
"#X#X#",
"X X##",
},
key = {
['#'] = "default:wood",
['X'] = "default:glass",
},
result = "default:mese 3",
2022-09-04 12:12:57 -05:00
}
2021-01-16 12:47:34 -06:00
2022-09-04 12:12:57 -05:00
i3.register_craft {
2021-01-16 12:47:34 -06:00
grid = {
"X #",
" ## ",
"X#X#",
"#X#X#",
"X X##",
" ## ",
},
key = {
['#'] = "default:wood",
['X'] = "default:glass",
},
result = "default:mese 3",
2022-09-04 12:12:57 -05:00
}
2021-01-16 12:47:34 -06:00
2022-09-04 12:12:57 -05:00
i3.register_craft {
2021-01-16 12:47:34 -06:00
grid = {
"X #",
" ## ",
"X#X#",
"#X#X#",
"X X##X",
" ## ",
},
key = {
['#'] = "default:wood",
['X'] = "default:glass",
},
result = "default:mese 3",
2022-09-04 12:12:57 -05:00
}
2021-01-16 12:47:34 -06:00
2022-09-04 12:12:57 -05:00
i3.register_craft {
2021-01-16 12:47:34 -06:00
grid = {
"X #",
" ## ",
"X#X#",
"#X#X#",
"X X##X#",
" ## ",
},
key = {
['#'] = "default:wood",
['X'] = "default:glass",
},
result = "default:mese 3",
2022-09-04 12:12:57 -05:00
}
2021-01-16 12:47:34 -06:00
2022-09-04 12:12:57 -05:00
i3.register_craft {
2021-01-16 12:47:34 -06:00
grid = {
"X #",
" ## ",
"X#X#",
"#X#X#",
"X X##X#X",
" ## ",
},
key = {
['#'] = "default:wood",
['X'] = "default:glass",
},
result = "default:mese 3",
2022-09-04 12:12:57 -05:00
}
2021-01-16 12:47:34 -06:00
2022-09-04 12:12:57 -05:00
i3.register_craft {
2021-01-16 12:47:34 -06:00
grid = {
"X #",
" ## ",
"X#X#",
"#X#X#",
"X X##X#X",
" ## ",
"#X#X#",
"#X#X#",
},
key = {
['#'] = "default:wood",
['X'] = "default:glass",
},
result = "default:mese 3",
2022-09-04 12:12:57 -05:00
}