nodes.lua 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. -- Default nodes for Itemshelf mod
  2. -- By Zorman2000
  3. local default_shelf = {
  4. type = "fixed",
  5. fixed = {
  6. {-0.5, -0.5, 0.4375, 0.5, 0.5, 0.5}, -- NodeBox1
  7. {-0.5, -0.5, -0.5, -0.4375, 0.5, 0.4375}, -- NodeBox2
  8. {-0.4375, -0.5, -0.5, 0.4375, -0.4375, 0.4375}, -- NodeBox3
  9. {0.4375, -0.5, -0.5, 0.5, 0.5, 0.4375}, -- NodeBox4
  10. {-0.4375, 0.4375, -0.5, 0.4375, 0.5, 0.4375}, -- NodeBox5
  11. {-0.4375, -0.0625, -0.5, 0.4375, 0.0625, 0.4375}, -- NodeBox6
  12. }
  13. }
  14. local default_half_shelf = {
  15. type = "fixed",
  16. fixed = {
  17. {-0.5, -0.5, 0.4375, 0.5, 0.5, 0.5}, -- NodeBox1
  18. {-0.5, -0.5, -0.125, -0.4375, 0.5, 0.5}, -- NodeBox2
  19. {0.4375, -0.5, -0.125, 0.5, 0.5, 0.5}, -- NodeBox3
  20. {-0.5, -0.0625, -0.125, 0.5, 0.0625, 0.5}, -- NodeBox4
  21. {-0.5, 0.4375, -0.125, 0.5, 0.5, 0.5}, -- NodeBox5
  22. {-0.5, -0.5, -0.125, 0.5, -0.4375, 0.5}, -- NodeBox6
  23. }
  24. }
  25. local default_half_shelf_open = {
  26. type = "fixed",
  27. fixed = {
  28. {-0.5, -0.5, -0.125, -0.4375, 0.5, 0.5}, -- NodeBox2
  29. {0.4375, -0.5, -0.125, 0.5, 0.5, 0.5}, -- NodeBox3
  30. {-0.5, -0.0625, -0.125, 0.5, 0.0625, 0.5}, -- NodeBox4
  31. {-0.5, 0.4375, -0.125, 0.5, 0.5, 0.5}, -- NodeBox5
  32. {-0.5, -0.5, -0.125, 0.5, -0.4375, 0.5}, -- NodeBox6
  33. }
  34. }
  35. itemshelf.register_shelf("small_shelf", {
  36. description = "Small Wooden Shelf",
  37. textures = {
  38. "default_wood.png",
  39. "default_wood.png",
  40. "default_wood.png",
  41. "default_wood.png",
  42. "default_wood.png",
  43. "default_wood.png"
  44. },
  45. nodebox = default_shelf,
  46. capacity = 4,
  47. shown_items = 4
  48. })
  49. itemshelf.register_shelf("large_shelf", {
  50. description = "Large Wooden Shelf",
  51. textures = {
  52. "default_wood.png",
  53. "default_wood.png",
  54. "default_wood.png",
  55. "default_wood.png",
  56. "default_wood.png",
  57. "default_wood.png"
  58. },
  59. nodebox = default_shelf,
  60. capacity = 6,
  61. shown_items = 6
  62. })
  63. itemshelf.register_shelf("half_depth_shelf_small", {
  64. description = "Small Wooden Half-Depth Shelf",
  65. textures = {
  66. "default_wood.png",
  67. "default_wood.png",
  68. "default_wood.png",
  69. "default_wood.png",
  70. "default_wood.png",
  71. "default_wood.png"
  72. },
  73. nodebox = default_half_shelf,
  74. capacity = 4,
  75. shown_items = 4,
  76. half_depth = true,
  77. })
  78. itemshelf.register_shelf("half_depth_shelf_large", {
  79. description = "Large Wooden Half-Depth Shelf",
  80. textures = {
  81. "default_wood.png",
  82. "default_wood.png",
  83. "default_wood.png",
  84. "default_wood.png",
  85. "default_wood.png",
  86. "default_wood.png"
  87. },
  88. nodebox = default_half_shelf,
  89. capacity = 6,
  90. shown_items = 6,
  91. half_depth = true,
  92. })
  93. itemshelf.register_shelf("half_depth_open_shelf", {
  94. description = "Small Wooden Half-Depth Open-Back Shelf",
  95. textures = {
  96. "default_wood.png",
  97. "default_wood.png",
  98. "default_wood.png",
  99. "default_wood.png",
  100. "default_wood.png",
  101. "default_wood.png"
  102. },
  103. nodebox = default_half_shelf_open,
  104. capacity = 4,
  105. shown_items = 4,
  106. half_depth = true,
  107. })
  108. itemshelf.register_shelf("half_depth_open_shelf_large", {
  109. description = "Large Wooden Half-Depth Open-Back Shelf",
  110. textures = {
  111. "default_wood.png",
  112. "default_wood.png",
  113. "default_wood.png",
  114. "default_wood.png",
  115. "default_wood.png",
  116. "default_wood.png"
  117. },
  118. nodebox = default_half_shelf_open,
  119. capacity = 6,
  120. shown_items = 6,
  121. half_depth = true,
  122. })
  123. -----------------------------------------
  124. minetest.register_craft({
  125. output = "itemshelf:small_shelf",
  126. recipe = {
  127. {"group:wood", "group:wood", "group:wood"},
  128. {"stairs:slab_wood", "default:chest", "stairs:slab_wood"},
  129. {"group:wood", "group:wood", "group:wood"},
  130. },
  131. })
  132. -- minetest.register_craft({
  133. -- output = "itemshelf:large_shelf",
  134. -- recipe = {
  135. -- {"group:wood", "group:wood", "group:wood"},
  136. -- {"default:chest", "stairs:slab_wood", "default:chest"},
  137. -- {"group:wood", "group:wood", "group:wood"},
  138. -- },
  139. -- })
  140. -----------------------------------------
  141. minetest.register_craft({
  142. output = "itemshelf:half_depth_open_shelf",
  143. recipe = {
  144. {"stairs:slab_wood", "stairs:slab_wood", "stairs:slab_wood"},
  145. {"stairs:slab_wood", "default:chest", "stairs:slab_wood"},
  146. {"stairs:slab_wood", "stairs:slab_wood", "stairs:slab_wood"},
  147. },
  148. })
  149. -- minetest.register_craft({
  150. -- output = "itemshelf:half_depth_open_shelf_large",
  151. -- recipe = {
  152. -- {"stairs:slab_wood", "stairs:slab_wood", "stairs:slab_wood"},
  153. -- {"default:chest", "stairs:slab_wood", "default:chest"},
  154. -- {"stairs:slab_wood", "stairs:slab_wood", "stairs:slab_wood"},
  155. -- },
  156. -- })
  157. -----------------------------------------
  158. minetest.register_craft({
  159. output = "itemshelf:half_depth_shelf_small",
  160. recipe = {
  161. {"stairs:slab_wood", "stairs:slab_wood", "stairs:slab_wood"},
  162. {"group:wood", "default:chest", "group:wood"},
  163. {"stairs:slab_wood", "stairs:slab_wood", "stairs:slab_wood"},
  164. },
  165. })
  166. -- minetest.register_craft({
  167. -- output = "itemshelf:half_depth_shelf_large",
  168. -- recipe = {
  169. -- {"stairs:slab_wood", "stairs:slab_wood", "stairs:slab_wood"},
  170. -- {"default:chest", "group:wood", "default:chest"},
  171. -- {"stairs:slab_wood", "stairs:slab_wood", "stairs:slab_wood"},
  172. -- },
  173. -- })
  174. -----------------------------------------
  175. minetest.register_craft({
  176. type = "shapeless",
  177. output = "itemshelf:small_shelf",
  178. recipe = {"itemshelf:large_shelf"},
  179. })
  180. minetest.register_craft({
  181. type = "shapeless",
  182. output = "itemshelf:large_shelf",
  183. recipe = {"itemshelf:small_shelf"},
  184. })
  185. -----------------------------------------
  186. minetest.register_craft({
  187. type = "shapeless",
  188. output = "itemshelf:half_depth_shelf_small",
  189. recipe = {"itemshelf:half_depth_shelf_large"},
  190. })
  191. minetest.register_craft({
  192. type = "shapeless",
  193. output = "itemshelf:half_depth_shelf_large",
  194. recipe = {"itemshelf:half_depth_shelf_small"},
  195. })
  196. -----------------------------------------
  197. minetest.register_craft({
  198. type = "shapeless",
  199. output = "itemshelf:half_depth_open_shelf",
  200. recipe = {"itemshelf:half_depth_open_shelf_large"},
  201. })
  202. minetest.register_craft({
  203. type = "shapeless",
  204. output = "itemshelf:half_depth_open_shelf_large",
  205. recipe = {"itemshelf:half_depth_open_shelf"},
  206. })
  207. -----------------------------------------
  208. --petz:elephant_tusk