crafting.lua 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. local materials = {
  2. {"wood", "group:wood"},
  3. {"stone", "group:stone", "default:stone"},
  4. {"copper", "default:copper_ingot"},
  5. {"tin", "lottores:tin_ingot"},
  6. {"steel", "default:steel_ingot"},
  7. {"bronze", "default:bronze_ingot"},
  8. {"silver", "lottores:silver_ingot"},
  9. {"gold", "default:gold_ingot"},
  10. {"galvorn", "lottores:galvorn_ingot"},
  11. {"mithril", "lottores:mithril_ingot"},
  12. }
  13. for i in ipairs(materials) do
  14. local name = materials[i][1]
  15. local craft = materials[i][2]
  16. local subcraft = materials[i][3] or craft
  17. minetest.register_craft({
  18. output = 'lottweapons:'..name..'_battleaxe',
  19. recipe = {
  20. {craft, 'group:stick', craft},
  21. {craft, 'group:stick', craft},
  22. {'', 'group:stick', ''},
  23. }
  24. })
  25. minetest.register_craft({
  26. type = "cooking",
  27. cooktime = 30,
  28. output = subcraft.." 2",
  29. recipe = "lottweapons:"..name.."_battleaxe",
  30. })
  31. minetest.register_craft({
  32. output = 'lottweapons:'..name..'_warhammer',
  33. recipe = {
  34. {craft, craft, craft},
  35. {craft, 'group:stick', craft},
  36. {'', 'group:stick', ''},
  37. }
  38. })
  39. minetest.register_craft({
  40. type = "cooking",
  41. cooktime = 30,
  42. output = subcraft.." 3",
  43. recipe = "lottweapons:"..name.."_warhammer",
  44. })
  45. minetest.register_craft({
  46. output = 'lottweapons:'..name..'_spear',
  47. recipe = {
  48. {'', craft, ''},
  49. {craft, 'group:stick', craft},
  50. {'', 'group:stick', ''},
  51. }
  52. })
  53. minetest.register_craft({
  54. type = "cooking",
  55. cooktime = 30,
  56. output = subcraft,
  57. recipe = "lottweapons:"..name.."_spear",
  58. })
  59. minetest.register_craft({
  60. output = 'lottweapons:'..name..'_dagger',
  61. recipe = {
  62. {craft},
  63. {'group:stick'},
  64. }
  65. })
  66. end
  67. minetest.register_craft({
  68. output = 'lottweapons:elven_sword',
  69. recipe = {
  70. {'', 'default:steel_ingot', ''},
  71. {'default:bronze_ingot', 'default:steel_ingot', 'default:bronze_ingot'},
  72. {'default:mese_crystal', 'group:stick', 'default:mese_crystal'},
  73. }
  74. })
  75. minetest.register_craft({
  76. type = "cooking",
  77. cooktime = 30,
  78. output = "default:mese_crystal",
  79. recipe = "lottweapons:elven_sword",
  80. })
  81. minetest.register_craft({
  82. output = 'lottweapons:orc_sword',
  83. recipe = {
  84. {'', 'lottores:orc_steel_ingot', 'lottores:orc_steel_ingot'},
  85. {'', 'lottores:orc_steel_ingot', ''},
  86. {'', 'group:stick', ''},
  87. }
  88. })
  89. minetest.register_craft({
  90. type = "cooking",
  91. cooktime = 30,
  92. output = "lottores:orc_steel_ingot",
  93. recipe = "lottweapons:orc_sword",
  94. })