fences.lua 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. minetest.register_node('furniture:fence_1_a', {
  2. _doc_items_crafting = 'This is crafted in the Woodworking Station.',
  3. description = 'Fence',
  4. drawtype = 'mesh',
  5. mesh = 'furniture_fence_1_a.obj',
  6. tiles = {'furniture_fence.png'},
  7. paramtype = 'light',
  8. paramtype2 = 'colorfacedir',
  9. palette = 'furniture_stain_palette.png',
  10. selection_box = {
  11. type = 'fixed',
  12. fixed = {-.5, -.5, -.0625, .5, .5, .0625},
  13. },
  14. collision_box = {
  15. type = 'fixed',
  16. fixed = {-.5, -.5, -.0625, .5, .5, .0625},
  17. },
  18. groups = {oddly_breakable_by_hand = 2, choppy=3, stainable=1},
  19. on_rightclick = function(pos, node)
  20. minetest.set_node(pos, {name='furniture:fence_1_d', param2 = node.param2})
  21. end,
  22. })
  23. minetest.register_node('furniture:fence_1_b', {
  24. _doc_items_crafting = 'This is crafted in the Woodworking Station.',
  25. description = 'Fence',
  26. drawtype = 'mesh',
  27. mesh = 'furniture_fence_1_b.obj',
  28. tiles = {'furniture_fence.png'},
  29. paramtype = 'light',
  30. paramtype2 = 'colorfacedir',
  31. palette = 'furniture_stain_palette.png',
  32. selection_box = {
  33. type = 'fixed',
  34. fixed = {
  35. {0.0625, -0.5, -0.0625, 0.5, 0.5, 0.0625},
  36. {-0.0625, -0.5, -0.5, 0.0625, 0.5, 0.0625}
  37. }
  38. },
  39. collision_box = {
  40. type = 'fixed',
  41. fixed = {
  42. {0.0625, -0.5, -0.0625, 0.5, 0.5, 0.0625},
  43. {-0.0625, -0.5, -0.5, 0.0625, 0.5, 0.0625}
  44. }
  45. },
  46. groups = {oddly_breakable_by_hand = 2, choppy=3, stainable=1},
  47. })
  48. minetest.register_node('furniture:fence_1_c', {
  49. _doc_items_crafting = 'This is crafted in the Woodworking Station.',
  50. description = 'Fence',
  51. drawtype = 'mesh',
  52. mesh = 'furniture_fence_1_c.obj',
  53. tiles = {'furniture_fence.png'},
  54. paramtype = 'light',
  55. paramtype2 = 'colorfacedir',
  56. palette = 'furniture_stain_palette.png',
  57. selection_box = {
  58. type = 'fixed',
  59. fixed = {
  60. {-0.5, -0.5, -0.0625, -0.0625, 0.5, 0.0625},
  61. {-0.0625, -0.5, -0.0625, 0.0625, 0.5, 0.5}
  62. },
  63. },
  64. collision_box = {
  65. type = 'fixed',
  66. fixed = {
  67. {-0.5, -0.5, -0.0625, -0.0625, 0.5, 0.0625},
  68. {-0.0625, -0.5, -0.0625, 0.0625, 0.5, 0.5}
  69. }
  70. },
  71. groups = {oddly_breakable_by_hand = 2, choppy=3, stainable=1},
  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 = {oddly_breakable_by_hand = 2, choppy=3, stainable=1, not_in_creative_inventory=1},
  98. on_rightclick = function(pos, node)
  99. minetest.set_node(pos, {name='furniture:fence_1_a', param2 = node.param2})
  100. end,
  101. })