Miroir du dépôt basic_materials.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

301 lines
8.6 KiB

  1. -- Translation support
  2. local S = minetest.get_translator("basic_materials")
  3. -- items
  4. minetest.register_craftitem("basic_materials:steel_wire", {
  5. description = S("Spool of steel wire"),
  6. groups = { wire = 1 },
  7. inventory_image = "basic_materials_steel_wire.png"
  8. })
  9. minetest.register_craftitem("basic_materials:copper_wire", {
  10. description = S("Spool of copper wire"),
  11. groups = { wire = 1 },
  12. inventory_image = "basic_materials_copper_wire.png"
  13. })
  14. minetest.register_craftitem("basic_materials:silver_wire", {
  15. description = S("Spool of silver wire"),
  16. groups = { wire = 1 },
  17. inventory_image = "basic_materials_silver_wire.png"
  18. })
  19. minetest.register_craftitem("basic_materials:gold_wire", {
  20. description = S("Spool of gold wire"),
  21. groups = { wire = 1 },
  22. inventory_image = "basic_materials_gold_wire.png"
  23. })
  24. minetest.register_craftitem("basic_materials:steel_strip", {
  25. description = S("Steel Strip"),
  26. groups = { strip = 1 },
  27. inventory_image = "basic_materials_steel_strip.png"
  28. })
  29. minetest.register_craftitem("basic_materials:copper_strip", {
  30. description = S("Copper Strip"),
  31. groups = { strip = 1 },
  32. inventory_image = "basic_materials_copper_strip.png"
  33. })
  34. minetest.register_craftitem("basic_materials:steel_bar", {
  35. description = S("Steel Bar"),
  36. inventory_image = "basic_materials_steel_bar.png",
  37. })
  38. minetest.register_craftitem("basic_materials:chainlink_brass", {
  39. description = S("Chainlinks (brass)"),
  40. groups = { chainlinks = 1 },
  41. inventory_image = "basic_materials_chainlink_brass.png"
  42. })
  43. minetest.register_craftitem("basic_materials:chainlink_steel", {
  44. description = S("Chainlinks (steel)"),
  45. groups = { chainlinks = 1 },
  46. inventory_image = "basic_materials_chainlink_steel.png"
  47. })
  48. minetest.register_craftitem("basic_materials:brass_ingot", {
  49. description = S("Brass Ingot"),
  50. inventory_image = "basic_materials_brass_ingot.png",
  51. })
  52. minetest.register_craftitem("basic_materials:gear_steel", {
  53. description = S("Steel gear"),
  54. inventory_image = "basic_materials_gear_steel.png"
  55. })
  56. minetest.register_craftitem("basic_materials:padlock", {
  57. description = S("Padlock"),
  58. inventory_image = "basic_materials_padlock.png"
  59. })
  60. -- nodes
  61. local chains_sbox = {
  62. type = "fixed",
  63. fixed = { -0.1, -0.5, -0.1, 0.1, 0.5, 0.1 }
  64. }
  65. minetest.register_node("basic_materials:chain_steel", {
  66. description = S("Chain (steel, hanging)"),
  67. drawtype = "mesh",
  68. mesh = "basic_materials_chains.obj",
  69. tiles = {"basic_materials_chain_steel.png"},
  70. walkable = false,
  71. climbable = true,
  72. sunlight_propagates = true,
  73. paramtype = "light",
  74. inventory_image = "basic_materials_chain_steel_inv.png",
  75. groups = {cracky=3},
  76. selection_box = chains_sbox,
  77. })
  78. minetest.register_node("basic_materials:chain_brass", {
  79. description = S("Chain (brass, hanging)"),
  80. drawtype = "mesh",
  81. mesh = "basic_materials_chains.obj",
  82. tiles = {"basic_materials_chain_brass.png"},
  83. walkable = false,
  84. climbable = true,
  85. sunlight_propagates = true,
  86. paramtype = "light",
  87. inventory_image = "basic_materials_chain_brass_inv.png",
  88. groups = {cracky=3},
  89. selection_box = chains_sbox,
  90. })
  91. minetest.register_node("basic_materials:brass_block", {
  92. description = S("Brass Block"),
  93. tiles = { "basic_materials_brass_block.png" },
  94. is_ground_content = false,
  95. groups = {cracky=1, level=2},
  96. sounds = default.node_sound_metal_defaults()
  97. })
  98. -- crafts
  99. minetest.register_craft( {
  100. output = "basic_materials:copper_wire 2",
  101. type = "shapeless",
  102. recipe = {
  103. "default:copper_ingot",
  104. "basic_materials:empty_spool",
  105. "basic_materials:empty_spool",
  106. },
  107. })
  108. minetest.register_craft( {
  109. output = "basic_materials:silver_wire 2",
  110. type = "shapeless",
  111. recipe = {
  112. "moreores:silver_ingot",
  113. "basic_materials:empty_spool",
  114. "basic_materials:empty_spool",
  115. },
  116. })
  117. minetest.register_craft( {
  118. output = "basic_materials:gold_wire 2",
  119. type = "shapeless",
  120. recipe = {
  121. "default:gold_ingot",
  122. "basic_materials:empty_spool",
  123. "basic_materials:empty_spool",
  124. },
  125. })
  126. minetest.register_craft( {
  127. output = "basic_materials:steel_wire 2",
  128. type = "shapeless",
  129. recipe = {
  130. "default:steel_ingot",
  131. "basic_materials:empty_spool",
  132. "basic_materials:empty_spool",
  133. },
  134. })
  135. minetest.register_craft( {
  136. output = "basic_materials:steel_strip 12",
  137. recipe = {
  138. { "", "default:steel_ingot", "" },
  139. { "default:steel_ingot", "", "" },
  140. },
  141. })
  142. minetest.register_craft( {
  143. output = "basic_materials:copper_strip 12",
  144. recipe = {
  145. { "", "default:copper_ingot", "" },
  146. { "default:copper_ingot", "", "" },
  147. },
  148. })
  149. minetest.register_craft( {
  150. output = "basic_materials:steel_bar 6",
  151. recipe = {
  152. { "", "", "default:steel_ingot" },
  153. { "", "default:steel_ingot", "" },
  154. { "default:steel_ingot", "", "" },
  155. },
  156. })
  157. minetest.register_craft( {
  158. output = "basic_materials:padlock 2",
  159. recipe = {
  160. { "basic_materials:steel_bar" },
  161. { "default:steel_ingot" },
  162. { "default:steel_ingot" },
  163. },
  164. })
  165. minetest.register_craft({
  166. output = "basic_materials:chainlink_steel 12",
  167. recipe = {
  168. {"", "default:steel_ingot", "default:steel_ingot"},
  169. { "default:steel_ingot", "", "default:steel_ingot" },
  170. { "default:steel_ingot", "default:steel_ingot", "" },
  171. },
  172. })
  173. minetest.register_craft({
  174. output = "basic_materials:chainlink_brass 12",
  175. recipe = {
  176. {"", "basic_materials:brass_ingot", "basic_materials:brass_ingot"},
  177. { "basic_materials:brass_ingot", "", "basic_materials:brass_ingot" },
  178. { "basic_materials:brass_ingot", "basic_materials:brass_ingot", "" },
  179. },
  180. })
  181. minetest.register_craft({
  182. output = 'basic_materials:chain_steel 2',
  183. recipe = {
  184. {"basic_materials:chainlink_steel"},
  185. {"basic_materials:chainlink_steel"},
  186. {"basic_materials:chainlink_steel"}
  187. }
  188. })
  189. minetest.register_craft({
  190. output = 'basic_materials:chain_brass 2',
  191. recipe = {
  192. {"basic_materials:chainlink_brass"},
  193. {"basic_materials:chainlink_brass"},
  194. {"basic_materials:chainlink_brass"}
  195. }
  196. })
  197. minetest.register_craft( {
  198. output = "basic_materials:gear_steel 6",
  199. recipe = {
  200. { "", "default:steel_ingot", "" },
  201. { "default:steel_ingot","basic_materials:chainlink_steel", "default:steel_ingot" },
  202. { "", "default:steel_ingot", "" }
  203. },
  204. })
  205. minetest.register_craft( {
  206. type = "shapeless",
  207. output = "basic_materials:brass_ingot 3",
  208. recipe = {
  209. "default:copper_ingot",
  210. "default:copper_ingot",
  211. "moreores:silver_ingot",
  212. },
  213. })
  214. if not minetest.get_modpath("moreores") then
  215. -- Without moreores, there still should be a way to create brass.
  216. minetest.register_craft( {
  217. output = "basic_materials:brass_ingot 9",
  218. recipe = {
  219. {"default:copper_ingot", "default:tin_ingot", "default:copper_ingot"},
  220. {"default:gold_ingot", "default:copper_ingot", "default:gold_ingot"},
  221. {"default:copper_ingot", "default:tin_ingot", "default:copper_ingot"},
  222. },
  223. })
  224. end
  225. minetest.register_craft( {
  226. type = "shapeless",
  227. output = "basic_materials:brass_ingot 9",
  228. recipe = { "basic_materials:brass_block" },
  229. })
  230. minetest.register_craft( {
  231. output = "basic_materials:brass_block",
  232. recipe = {
  233. { "basic_materials:brass_ingot", "basic_materials:brass_ingot", "basic_materials:brass_ingot" },
  234. { "basic_materials:brass_ingot", "basic_materials:brass_ingot", "basic_materials:brass_ingot" },
  235. { "basic_materials:brass_ingot", "basic_materials:brass_ingot", "basic_materials:brass_ingot" },
  236. },
  237. })
  238. -- aliases
  239. minetest.register_alias("homedecor:copper_wire", "basic_materials:copper_wire")
  240. minetest.register_alias("technic:fine_copper_wire", "basic_materials:copper_wire")
  241. minetest.register_alias("technic:fine_silver_wire", "basic_materials:silver_wire")
  242. minetest.register_alias("technic:fine_gold_wire", "basic_materials:gold_wire")
  243. minetest.register_alias("homedecor:steel_wire", "basic_materials:steel_wire")
  244. minetest.register_alias("homedecor:brass_ingot", "basic_materials:brass_ingot")
  245. minetest.register_alias("technic:brass_ingot", "basic_materials:brass_ingot")
  246. minetest.register_alias("technic:brass_block", "basic_materials:brass_block")
  247. minetest.register_alias("homedecor:copper_strip", "basic_materials:copper_strip")
  248. minetest.register_alias("homedecor:steel_strip", "basic_materials:steel_strip")
  249. minetest.register_alias_force("glooptest:chainlink", "basic_materials:chainlink_steel")
  250. minetest.register_alias_force("homedecor:chainlink_steel", "basic_materials:chainlink_steel")
  251. minetest.register_alias("homedecor:chainlink_brass", "basic_materials:chainlink_brass")
  252. minetest.register_alias("chains:chain", "basic_materials:chain_steel")
  253. minetest.register_alias("chains:chain_brass", "basic_materials:chain_brass")
  254. minetest.register_alias("pipeworks:gear", "basic_materials:gear_steel")
  255. minetest.register_alias("technic:rebar", "basic_materials:steel_bar")