init.lua 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. local chains_sbox = {
  2. type = "fixed",
  3. fixed = { -0.1, -0.625, -0.1, 0.1, 0.5, 0.1 }
  4. }
  5. local topchains_sbox = {
  6. type = "fixed",
  7. fixed = {
  8. { -0.25, 0.35, -0.25, 0.25, 0.5, 0.25 },
  9. { -0.1, -0.625, -0.1, 0.1, 0.4, 0.1 }
  10. }
  11. }
  12. minetest.register_node("chains:iron_chain", {
  13. description = "Wrought Iron Chain",
  14. drawtype = "mesh",
  15. mesh = "chains.obj",
  16. tiles = {"chains_iron.png"},
  17. walkable = false,
  18. climbable = true,
  19. sunlight_propagates = true,
  20. paramtype = "light",
  21. groups = utility.dig_groups("bigitem", {hanging_node=1}),
  22. selection_box = {
  23. type = "fixed",
  24. fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
  25. },
  26. sounds = default.node_sound_metal_defaults(),
  27. })
  28. minetest.register_node("chains:bronze_chain", {
  29. description = "Bronze Chain",
  30. drawtype = "mesh",
  31. mesh = "chains.obj",
  32. tiles = {"chains_bronze.png"},
  33. walkable = false,
  34. climbable = true,
  35. sunlight_propagates = true,
  36. paramtype = "light",
  37. groups = utility.dig_groups("bigitem", {hanging_node=1}),
  38. selection_box = {
  39. type = "fixed",
  40. fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
  41. },
  42. sounds = default.node_sound_metal_defaults(),
  43. })
  44. minetest.register_node("chains:iron_chain_top", {
  45. description = "Wrought Iron Chain Ceiling Mount",
  46. drawtype = "mesh",
  47. mesh = "top_chains.obj",
  48. tiles = {"chains_iron.png"},
  49. walkable = false,
  50. climbable = true,
  51. sunlight_propagates = true,
  52. paramtype = "light",
  53. groups = utility.dig_groups("bigitem", {hanging_node=1}),
  54. selection_box = {
  55. type = "fixed",
  56. fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
  57. },
  58. sounds = default.node_sound_metal_defaults(),
  59. })
  60. minetest.register_node("chains:bronze_chain_top", {
  61. description = "Bronze Chain Ceiling Mount",
  62. drawtype = "mesh",
  63. mesh = "top_chains.obj",
  64. tiles = {"chains_bronze.png"},
  65. walkable = false,
  66. climbable = true,
  67. sunlight_propagates = true,
  68. paramtype = "light",
  69. groups = utility.dig_groups("bigitem", {hanging_node=1}),
  70. selection_box = {
  71. type = "fixed",
  72. fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
  73. },
  74. sounds = default.node_sound_metal_defaults(),
  75. })
  76. minetest.register_node("chains:iron_chandelier", {
  77. description = "Wrought Iron Chandelier",
  78. paramtype = "light",
  79. light_source = default.LIGHT_MAX-3,
  80. walkable = false,
  81. climbable = true,
  82. sunlight_propagates = true,
  83. paramtype = "light",
  84. tiles = {
  85. "chains_iron.png",
  86. "chains_candle.png",
  87. {
  88. name="chains_flame.png",
  89. animation={
  90. type="vertical_frames",
  91. aspect_w=16,
  92. aspect_h=16,
  93. length=3.0
  94. }
  95. }
  96. },
  97. drawtype = "mesh",
  98. mesh = "chains_chandelier.obj",
  99. groups = utility.dig_groups("bigitem", {hanging_node=1}),
  100. sounds = default.node_sound_metal_defaults(),
  101. })
  102. minetest.register_node("chains:bronze_chandelier", {
  103. description = "Bronze Chandelier",
  104. paramtype = "light",
  105. light_source = default.LIGHT_MAX-3,
  106. walkable = false,
  107. climbable = true,
  108. sunlight_propagates = true,
  109. paramtype = "light",
  110. tiles = {
  111. "chains_bronze.png",
  112. "chains_candle.png",
  113. {
  114. name="chains_flame.png",
  115. animation={
  116. type="vertical_frames",
  117. aspect_w=16,
  118. aspect_h=16,
  119. length=3.0
  120. }
  121. }
  122. },
  123. drawtype = "mesh",
  124. mesh = "chains_chandelier.obj",
  125. groups = utility.dig_groups("bigitem", {hanging_node=1}),
  126. sounds = default.node_sound_metal_defaults(),
  127. })
  128. -- crafts
  129. minetest.register_craft({
  130. output = 'chains:iron_chain 3',
  131. recipe = {
  132. {'default:steel_ingot'},
  133. {'default:steel_ingot'},
  134. {'default:steel_ingot'},
  135. }
  136. })
  137. minetest.register_craft({
  138. output = 'chains:iron_chain_top',
  139. recipe = {
  140. {'default:steel_ingot'},
  141. {'chains:iron_chain'},
  142. },
  143. })
  144. minetest.register_craft({
  145. output = 'chains:iron_chandelier',
  146. recipe = {
  147. {'', 'chains:iron_chain', ''},
  148. {'group:torch_craftitem', 'chains:iron_chain', 'group:torch_craftitem'},
  149. {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
  150. }
  151. })
  152. minetest.register_craft({
  153. output = 'chains:bronze_chain 3',
  154. recipe = {
  155. {'default:bronze_ingot'},
  156. {'default:bronze_ingot'},
  157. {'default:bronze_ingot'},
  158. }
  159. })
  160. minetest.register_craft({
  161. output = 'chains:bronze_chain_top',
  162. recipe = {
  163. {'default:bronze_ingot'},
  164. {'chains:bronze_chain'},
  165. },
  166. })
  167. minetest.register_craft({
  168. output = 'chains:bronze_chandelier',
  169. recipe = {
  170. {'', 'chains:bronze_chain', ''},
  171. {'group:torch_craftitem', 'chains:bronze_chain', 'group:torch_craftitem'},
  172. {'default:bronze_ingot', 'default:bronze_ingot', 'default:bronze_ingot'},
  173. }
  174. })