crafts.lua 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. local border_blocks = {
  2. { "goldblock", "default"},
  3. { "diamondblock", "default" },
  4. { "glass", "default"},
  5. { "mithril_block", "moreores"},
  6. { "silver_block", "moreores" },
  7. { "amethystblock", "glooptest" },
  8. { "emeraldblock", "glooptest" },
  9. { "rubyblock", "glooptest"},
  10. { "sapphireblock", "glooptest" },
  11. { "taliniteblock", "glooptest" },
  12. { "topazblock", "glooptest" },
  13. { "crystal_glass", "glooptest" }
  14. }
  15. for i in ipairs(border_blocks) do
  16. local block = border_blocks[i][1]
  17. local mod = border_blocks[i][2]
  18. if block ~= "goldblock" then
  19. minetest.register_craft( {
  20. output = "gold_and_gem:golden_"..block.." 5",
  21. recipe = {
  22. {"default:gold_ingot", mod .. ":" .. block, "default:gold_ingot"},
  23. { mod .. ":" .. block, mod .. ":" .. block, mod .. ":" .. block},
  24. {"default:gold_ingot", mod .. ":" .. block, "default:gold_ingot"},
  25. },
  26. })
  27. end
  28. if block ~= "mithril_block" then
  29. minetest.register_craft( {
  30. output = "gold_and_gem:mithril_"..block.." 5",
  31. recipe = {
  32. {"moreores:mithril_ingot", mod .. ":" .. block, "moreores:mithril_ingot"},
  33. { mod .. ":" .. block, mod .. ":" .. block, mod .. ":" .. block},
  34. {"moreores:mithril_ingot", mod .. ":" .. block, "moreores:mithril_ingot"},
  35. },
  36. })
  37. end
  38. end
  39. local glass_tables = { "glass_table_small_round_b", "glass_table_small_square_b", "glass_table_large_b"}
  40. local table_borders = {
  41. { "gold", "default:gold_ingot"},
  42. { "mithril", "moreores:mithril_ingot"},
  43. { "emerald", "glooptest:emerald_gem"},
  44. { "ruby", "glooptest:ruby_gem"}
  45. }
  46. for i in ipairs(glass_tables) do
  47. local table = glass_tables[i]
  48. for j in ipairs(table_borders) do
  49. local border = table_borders[j][1]
  50. local border_item = table_borders[j][2]
  51. minetest.register_craft( {
  52. output = "gold_and_gem:"..border.. "_" ..table.." 3",
  53. recipe = {
  54. {border_item, "", border_item},
  55. { "homedecor:" ..table, "homedecor:" ..table, "homedecor:" ..table},
  56. {"", "", ""},
  57. },
  58. })
  59. end
  60. end
  61. local bobblock = {
  62. { "blue", "moreores", "mithril_ingot", "wool:blue"},
  63. { "green", "glooptest", "arol_ingot", "wool:dark_green"},
  64. { "grey", "default", "stone", ""},
  65. { "indigo", "glooptest", "akalin_ingot", "wool:magenta"},
  66. { "orange", "glooptest", "topaz_gem", "wool:orange"},
  67. { "red", "glooptest", "ruby_gem", "wool: red"},
  68. { "violet", "glooptest", "alatro_ingot", "wool: violet"},
  69. { "white", "default", "diamond", ""},
  70. { "yellow", "default", "mese_crystal", ""},
  71. { "lime", "technic", "uranium_ingot", "wool:green"},
  72. { "pink", "glooptest", "amethyst_gem", "wool:pink"},
  73. { "cyan", "glooptest", "talinite_ingot", "wool:cyan"}
  74. }
  75. local light_source = "homedecor:glowlight_small_cube_white"
  76. if not minetest.get_modpath("homedecor") then
  77. light_source = "default:torch"
  78. end
  79. for i in ipairs(bobblock) do
  80. local block = bobblock[i][1]
  81. local mod = bobblock[i][2]
  82. local mod_item = bobblock[i][3]
  83. local d_item = bobblock[i][4]
  84. local item = mod ..":".. mod_item
  85. if (mod ~= "default" and not minetest.get_modpath(mod))then
  86. item = d_item
  87. end
  88. minetest.register_craft({
  89. output = "gold_and_gem:"..block.."block 2",
  90. recipe = {
  91. {"default:glass", item, "default:obsidian_glass"},
  92. { item,light_source,item},
  93. {"default:obsidian_glass", item, "default:glass"},
  94. },
  95. })
  96. minetest.register_craft({
  97. type = "shapeless",
  98. output = "gold_and_gem:"..block.."pole 4",
  99. recipe = {
  100. "gold_and_gem:"..block.."block"
  101. },
  102. })
  103. end
  104. local gemlamps = {"ruby","amethyst","emerald", "topaz", "sapphire"}
  105. for i in ipairs(gemlamps) do
  106. local gem = gemlamps[i]
  107. light_source = "homedecor:candle"
  108. if not minetest.get_modpath("homedecor") then
  109. light_source = "default:torch"
  110. end
  111. minetest.register_craft({
  112. output = "gold_and_gem:"..gem.."_lamp 2",
  113. recipe = {
  114. {"glooptest:"..gem.."_gem","default:diamond", "glooptest:"..gem.."_gem"},
  115. { "technic:marble",light_source,"technic:marble"},
  116. {"", "moreores:silver_ingot", ""},
  117. },
  118. })
  119. end
  120. local pillars = {"gold","silver"}
  121. for i in ipairs(pillars) do
  122. local pill = pillars[i]
  123. minetest.register_craft({
  124. output = "gold_and_gem:pillar_"..pill.." 6",
  125. recipe = {
  126. {"technic:marble","technic:marble", "technic:marble"},
  127. { "technic:fine_"..pill.."_wire","technic:marble","technic:fine_"..pill.."_wire"},
  128. {"technic:marble", "technic:marble", "technic:marble"},
  129. },
  130. })
  131. minetest.register_craft({
  132. output = "gold_and_gem:pillar_ground_"..pill.." 2",
  133. recipe = {
  134. {"","gold_and_gem:pillar_"..pill, ""},
  135. { "","gold_and_gem:pillar_"..pill,""},
  136. {"technic:slab_marble_quarter", "technic:slab_marble_quarter", "technic:slab_marble_quarter"},
  137. },
  138. })
  139. minetest.register_craft({
  140. output = "gold_and_gem:pillar_top_"..pill.." 2",
  141. recipe = {
  142. {"technic:slab_marble_quarter", "technic:slab_marble_quarter", "technic:slab_marble_quarter"},
  143. { "","gold_and_gem:pillar_"..pill,""},
  144. {"","gold_and_gem:pillar_"..pill,""},
  145. },
  146. })
  147. end
  148. minetest.register_craft({
  149. output = "gold_and_gem:pillar 6",
  150. recipe = {
  151. {"technic:marble","technic:marble", "technic:marble"},
  152. { "technic:marble_bricks","technic:marble","technic:marble_bricks"},
  153. {"technic:marble", "technic:marble", "technic:marble"},
  154. },
  155. })
  156. minetest.register_craft({
  157. output = "gold_and_gem:pillar_ground 2",
  158. recipe = {
  159. {"","gold_and_gem:pillar", ""},
  160. { "","gold_and_gem:pillar",""},
  161. {"technic:slab_marble_quarter", "technic:slab_marble_quarter", "technic:slab_marble_quarter"},
  162. },
  163. })
  164. minetest.register_craft({
  165. output = "gold_and_gem:pillar_top 2",
  166. recipe = {
  167. {"technic:slab_marble_quarter", "technic:slab_marble_quarter", "technic:slab_marble_quarter"},
  168. { "","gold_and_gem:pillar",""},
  169. {"","gold_and_gem:pillar",""},
  170. },
  171. })