quater_slab.lua 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. -- Node will be called <modname>slab_<subname>
  2. function stairsplus.register_quater_slab(modname, subname, recipeitem, groups, images, description, drop, sounds, sunlight)
  3. --
  4. -- nodes
  5. --
  6. minetest.register_node(":".. modname .. ":slab_" .. subname .. "_quarter", {
  7. description = description,
  8. drawtype = "nodebox",
  9. tiles = images,
  10. paramtype = "light",
  11. is_ground_content = false,
  12. sunlight_propagates = sunlight,
  13. groups = groups,
  14. drop = modname .. ":slab_" .. drop .. "_quarter",
  15. node_box = {
  16. type = "fixed",
  17. fixed = {-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
  18. },
  19. sounds = sounds,
  20. })
  21. minetest.register_node(":".. modname .. ":slab_" .. subname .. "_quarter_inverted", {
  22. description = description,
  23. drawtype = "nodebox",
  24. tiles = images,
  25. paramtype = "light",
  26. is_ground_content = false,
  27. sunlight_propagates = sunlight,
  28. groups = groups,
  29. drop = modname .. ":slab_" .. drop .. "_quarter_inverted",
  30. node_box = {
  31. type = "fixed",
  32. fixed = {-0.5, 0.25, -0.5, 0.5, 0.5, 0.5},
  33. },
  34. sounds = sounds,
  35. })
  36. minetest.register_node(":".. modname .. ":slab_" .. subname .. "_three_quarter", {
  37. description = description,
  38. drawtype = "nodebox",
  39. tiles = images,
  40. paramtype = "light",
  41. is_ground_content = false,
  42. sunlight_propagates = sunlight,
  43. groups = groups,
  44. drop = modname .. ":slab_" .. drop .. "_three_quarter",
  45. node_box = {
  46. type = "fixed",
  47. fixed = {-0.5, -0.5, -0.5, 0.5, 0.25, 0.5},
  48. },
  49. sounds = sounds,
  50. })
  51. minetest.register_node(":".. modname .. ":slab_" .. subname .. "_three_quarter_inverted", {
  52. description = description,
  53. drawtype = "nodebox",
  54. tiles = images,
  55. paramtype = "light",
  56. is_ground_content = false,
  57. sunlight_propagates = sunlight,
  58. groups = groups,
  59. drop = modname .. ":slab_" .. drop .. "_three_quarter_inverted",
  60. node_box = {
  61. type = "fixed",
  62. fixed = {-0.5, -0.25, -0.5, 0.5, 0.5, 0.5},
  63. },
  64. sounds = sounds,
  65. })
  66. --
  67. -- crafting
  68. --
  69. minetest.register_craft({
  70. output = modname .. ":slab_" .. subname .. "_quarter 6",
  71. recipe = {
  72. {modname .. ":slab_" .. subname, modname .. ":slab_" .. subname, modname .. ":slab_" .. subname},
  73. },
  74. })
  75. minetest.register_craft({
  76. output = modname .. ":slab_" .. subname .. "_quarter_inverted 6",
  77. recipe = {
  78. {modname .. ":slab_" .. subname .. "_inverted", modname .. ":slab_" .. subname .. "_inverted", modname .. ":slab_" .. subname .. "_inverted"},
  79. },
  80. })
  81. minetest.register_craft({
  82. output = modname .. ":slab_" .. subname .. "_quarter_inverted 1",
  83. recipe = {
  84. {modname .. ":slab_" .. subname .. "_quarter"},
  85. },
  86. })
  87. minetest.register_craft({
  88. output = modname .. ":slab_" .. subname .. "_quarter 1",
  89. recipe = {
  90. {modname .. ":slab_" .. subname .. "_quarter_inverted"},
  91. },
  92. })
  93. minetest.register_craft({
  94. output = modname .. ":slab_" .. subname .. "_three_quarter_inverted 1",
  95. recipe = {
  96. {modname .. ":slab_" .. subname .. "_three_quarter"},
  97. },
  98. })
  99. minetest.register_craft({
  100. output = modname .. ":slab_" .. subname .. "_three_quarter 1",
  101. recipe = {
  102. {modname .. ":slab_" .. subname .. "_three_quarter_inverted"},
  103. },
  104. })
  105. minetest.register_craft({
  106. output = modname .. ":slab_" .. subname .. "_three_quarter 1",
  107. recipe = {
  108. {modname .. ":slab_" .. subname .. "_quarter"},
  109. {modname .. ":slab_" .. subname .. "_quarter"},
  110. {modname .. ":slab_" .. subname .. "_quarter"},
  111. },
  112. })
  113. minetest.register_craft({
  114. output = modname .. ":slab_" .. subname .. "_three_quarter_inverted",
  115. recipe = {
  116. {modname .. ":slab_" .. subname .. "_quarter_inverted"},
  117. {modname .. ":slab_" .. subname .. "_quarter_inverted"},
  118. {modname .. ":slab_" .. subname .. "_quarter_inverted"},
  119. },
  120. })
  121. minetest.register_craft({
  122. output = recipeitem,
  123. recipe = {
  124. {modname .. ":slab_" .. subname .. "_quarter"},
  125. {modname .. ":slab_" .. subname .. "_quarter"},
  126. {modname .. ":slab_" .. subname .. "_quarter"},
  127. {modname .. ":slab_" .. subname .. "_quarter"},
  128. },
  129. })
  130. minetest.register_craft({
  131. output = modname .. ":slab_" .. subname .. " 1",
  132. recipe = {
  133. {modname .. ":slab_" .. subname .. "_quarter"},
  134. {modname .. ":slab_" .. subname .. "_quarter"},
  135. },
  136. })
  137. minetest.register_craft({
  138. output = modname .. ":slab_" .. subname .. "_inverted 1",
  139. recipe = {
  140. {modname .. ":slab_" .. subname .. "_quarter_inverted"},
  141. {modname .. ":slab_" .. subname .. "_quarter_inverted"},
  142. },
  143. })
  144. minetest.register_craft({
  145. output = modname .. ":slab_" .. subname .. "_quarter 6",
  146. recipe = {
  147. {modname .. ":slab_" .. subname .. "_three_quarter"},
  148. {modname .. ":slab_" .. subname .. "_three_quarter"},
  149. },
  150. })
  151. --
  152. -- cooking
  153. --
  154. minetest.register_craft({
  155. type = "cooking",
  156. output = modname .. ":slab_stone_quarter",
  157. recipe = modname .. ":slab_cobble_quarter",
  158. })
  159. minetest.register_craft({
  160. type = "cooking",
  161. output = modname .. ":slab_stone_quarter_inverted",
  162. recipe = modname .. ":slab_cobble_quarter_inverted",
  163. })
  164. minetest.register_craft({
  165. type = "cooking",
  166. output = modname .. ":slab_stone_three_quarter",
  167. recipe = modname .. ":slab_cobble_three_quarter",
  168. })
  169. minetest.register_craft({
  170. type = "cooking",
  171. output = modname .. ":slab_stone_three_quarter_inverted",
  172. recipe = modname .. ":slab_cobble_three_quarter_inverted",
  173. })
  174. end