fences.lua 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. minetest.register_node('furniture:fence_1_a', {
  2. description = 'Fence',
  3. drawtype = 'mesh',
  4. mesh = 'furniture_fence_1_a.obj',
  5. tiles = {'furniture_fence.png'},
  6. paramtype = 'light',
  7. paramtype2 = 'colorfacedir',
  8. palette = 'furniture_stain_palette.png',
  9. selection_box = {
  10. type = 'fixed',
  11. fixed = {-.5, -.5, -.0625, .5, .5, .0625},
  12. },
  13. collision_box = {
  14. type = 'fixed',
  15. fixed = {-.5, -.5, -.0625, .5, .5, .0625},
  16. },
  17. groups = {breakable=1},
  18. on_rightclick = furniture.right_click,
  19. on_punch = furniture.punch
  20. })
  21. minetest.register_node('furniture:fence_1_b', {
  22. description = 'Fence',
  23. drawtype = 'mesh',
  24. mesh = 'furniture_fence_1_b.obj',
  25. tiles = {'furniture_fence.png'},
  26. paramtype = 'light',
  27. paramtype2 = 'colorfacedir',
  28. palette = 'furniture_stain_palette.png',
  29. selection_box = {
  30. type = 'fixed',
  31. fixed = {
  32. {0.0625, -0.5, -0.0625, 0.5, 0.5, 0.0625},
  33. {-0.0625, -0.5, -0.5, 0.0625, 0.5, 0.0625}
  34. }
  35. },
  36. collision_box = {
  37. type = 'fixed',
  38. fixed = {
  39. {0.0625, -0.5, -0.0625, 0.5, 0.5, 0.0625},
  40. {-0.0625, -0.5, -0.5, 0.0625, 0.5, 0.0625}
  41. }
  42. },
  43. groups = {breakable=1},
  44. on_rightclick = furniture.right_click,
  45. on_punch = furniture.punch
  46. })
  47. minetest.register_node('furniture:fence_1_c', {
  48. description = 'Fence',
  49. drawtype = 'mesh',
  50. mesh = 'furniture_fence_1_c.obj',
  51. tiles = {'furniture_fence.png'},
  52. paramtype = 'light',
  53. paramtype2 = 'colorfacedir',
  54. palette = 'furniture_stain_palette.png',
  55. selection_box = {
  56. type = 'fixed',
  57. fixed = {
  58. {-0.5, -0.5, -0.0625, -0.0625, 0.5, 0.0625},
  59. {-0.0625, -0.5, -0.0625, 0.0625, 0.5, 0.5}
  60. },
  61. },
  62. collision_box = {
  63. type = 'fixed',
  64. fixed = {
  65. {-0.5, -0.5, -0.0625, -0.0625, 0.5, 0.0625},
  66. {-0.0625, -0.5, -0.0625, 0.0625, 0.5, 0.5}
  67. }
  68. },
  69. groups = {breakable=1},
  70. on_rightclick = furniture.right_click,
  71. on_punch = furniture.punch
  72. })
  73. minetest.register_node('furniture:fence_1_d', {
  74. description = 'Gate',
  75. drawtype = 'mesh',
  76. mesh = 'furniture_fence_1_d.obj',
  77. tiles = {'furniture_fence.png'},
  78. paramtype = 'light',
  79. paramtype2 = 'colorfacedir',
  80. palette = 'furniture_stain_palette.png',
  81. selection_box = {
  82. type = 'fixed',
  83. fixed = {
  84. {0.375, -0.5, -0.0625, 0.5, 0.5, 0.0625},
  85. {-0.5, -0.5, -0.0625, -0.375, 0.5, 0.0625},
  86. {-0.375, -0.5, -0.0625, -0.25, 0.375, 0.75}
  87. }
  88. },
  89. collision_box = {
  90. type = 'fixed',
  91. fixed = {
  92. {0.375, -0.5, -0.0625, 0.5, 0.5, 0.0625},
  93. {-0.5, -0.5, -0.0625, -0.375, 0.5, 0.0625},
  94. {-0.375, -0.5, -0.0625, -0.25, 0.375, 0.75}
  95. }
  96. },
  97. groups = {breakable=1},
  98. on_rightclick = furniture.right_click,
  99. on_punch = furniture.punch
  100. })
  101. minetest.register_node('furniture:fence_1_e', {
  102. description = 'Double Fence',
  103. drawtype = 'mesh',
  104. mesh = 'furniture_fence_1_e.obj',
  105. tiles = {'furniture_fence.png'},
  106. paramtype = 'light',
  107. paramtype2 = 'colorfacedir',
  108. palette = 'furniture_stain_palette.png',
  109. selection_box = {
  110. type = 'fixed',
  111. fixed = {
  112. {1.375, -0.5, -0.0625, 1.5, 0.5, 0.0625},
  113. {-0.5, -0.5, -0.0625, -0.375, 0.5, 0.0625},
  114. {-0.375, -0.5, -0.0625, 1.375, 0.375, 0.0625}
  115. }
  116. },
  117. collision_box = {
  118. type = 'fixed',
  119. fixed = {
  120. {1.375, -0.5, -0.0625, 1.5, 0.5, 0.0625},
  121. {-0.5, -0.5, -0.0625, -0.375, 0.5, 0.0625},
  122. {-0.375, -0.5, -0.0625, 1.375, 0.375, 0.0625}
  123. }
  124. },
  125. groups = {breakable=1},
  126. on_rightclick = furniture.right_click,
  127. on_punch = furniture.punch
  128. })
  129. minetest.register_node('furniture:fence_1_f', {
  130. description = 'Double Gate',
  131. drawtype = 'mesh',
  132. mesh = 'furniture_fence_1_f.obj',
  133. tiles = {'furniture_fence.png'},
  134. paramtype = 'light',
  135. paramtype2 = 'colorfacedir',
  136. palette = 'furniture_stain_palette.png',
  137. selection_box = {
  138. type = 'fixed',
  139. fixed = {
  140. {1.375, -0.5, -0.0625, 1.5, 0.5, 0.0625},
  141. {-0.5, -0.5, -0.0625, -0.375, 0.5, 0.0625},
  142. {-0.375, -0.5, -0.0625, -0.25, 0.375, 0.75},
  143. {1.375, -0.5, 0.0625, 1.25, 0.375, 0.75}
  144. }
  145. },
  146. collision_box = {
  147. type = 'fixed',
  148. fixed = {
  149. {1.375, -0.5, -0.0625, 1.5, 0.5, 0.0625},
  150. {-0.5, -0.5, -0.0625, -0.375, 0.5, 0.0625},
  151. {-0.375, -0.5, -0.0625, -0.25, 0.375, 0.75},
  152. {1.375, -0.5, 0.0625, 1.25, 0.375, 0.75}
  153. }
  154. },
  155. groups = {breakable=1},
  156. on_rightclick = furniture.right_click,
  157. on_punch = furniture.punch
  158. })
  159. minetest.register_node('furniture:fence_security', {
  160. description = 'Security Fencing',
  161. drawtype = 'mesh',
  162. mesh = 'furniture_fence_security.obj',
  163. tiles = {'furniture_fence_security.png'},
  164. use_texture_alpha = 'clip',
  165. paramtype = 'light',
  166. paramtype2 = 'facedir',
  167. selection_box = {
  168. type = 'fixed',
  169. fixed = {-.5, -.5, -.125, 1.5, 1.5, .125},
  170. },
  171. collision_box = {
  172. type = 'fixed',
  173. fixed = {-.5, -.5, -.125, 1.5, 1.5, .125},
  174. },
  175. groups = {breakable=1},
  176. })