basic_signs.lua 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. minetest.register_node('signs:directional_sign', {
  2. drawtype = 'mesh',
  3. mesh = 'signs_directional.obj',
  4. description = 'Directional Sign',
  5. groups = {breakable=1},
  6. sunlight_propagates = true,
  7. paramtype = 'light',
  8. paramtype2 = 'facedir',
  9. tiles = {'signs_directional.png'},
  10. selection_box = {
  11. type = 'fixed',
  12. fixed = {-.4, 0, .4, .45, .325, .5},
  13. },
  14. collision_box = {
  15. type = 'fixed',
  16. fixed = {-.45, -.1, .4, .45, .4, .5},
  17. },
  18. on_construct = signs.on_construct,
  19. after_place_node = signs.after_place_node,
  20. on_receive_fields = signs.on_receive_fields
  21. })
  22. minetest.register_node('signs:post_directional', {-- Update to degrotate after next release.
  23. drawtype = 'mesh',
  24. mesh = 'signs_post_directional.obj',
  25. description = 'Directional Sign Post',
  26. groups = {breakable=1},
  27. sunlight_propagates = true,
  28. paramtype = 'light',
  29. paramtype2 = 'facedir',
  30. tiles = {'signs_post_directional.png'},
  31. selection_box = {
  32. type = 'fixed',
  33. fixed = {-.4, -.1, -.1, .45, .4, .1},
  34. },
  35. collision_box = {
  36. type = 'fixed',
  37. fixed = {-.4, -.3, -.1, .45, .4, .1},
  38. },
  39. on_construct = signs.on_construct,
  40. after_place_node = signs.after_place_node,
  41. on_receive_fields = signs.on_receive_fields
  42. })
  43. minetest.register_node('signs:arrow_hanging', {
  44. drawtype = 'mesh',
  45. mesh = 'signs_arrow_hanging.obj',
  46. description = 'Hanging Arrow Sign',
  47. groups = {breakable=1},
  48. sunlight_propagates = true,
  49. paramtype = 'light',
  50. paramtype2 = 'facedir',
  51. tiles = {'signs_arrow_hanging.png'},
  52. selection_box = {
  53. type = 'fixed',
  54. fixed = {-.45, 0, -.1, .45, .5, .1},
  55. },
  56. collision_box = {
  57. type = 'fixed',
  58. fixed = {-.45, 0, -.1, .45, .5, .1},
  59. },
  60. on_construct = signs.on_construct,
  61. after_place_node = signs.after_place_node,
  62. on_receive_fields = signs.on_receive_fields
  63. })
  64. for i = 1, 6 do
  65. minetest.register_node('signs:poster_'..i, {
  66. description = 'Poster',
  67. drawtype = 'mesh',
  68. mesh = 'signs_poster_1.obj',
  69. groups = {breakable=1},
  70. sunlight_propagates = true,
  71. paramtype = 'light',
  72. paramtype2 = 'facedir',
  73. tiles = {'signs_poster_'..i..'.png'},
  74. use_texture_alpha = 'clip',
  75. walkable = false,
  76. selection_box = {
  77. type = 'fixed',
  78. fixed = {-.5, -.5, .45, .5, .5, .5},
  79. },
  80. collision_box = {
  81. type = 'fixed',
  82. fixed = {-.5, -.5, .45, .5, .5, .5},
  83. },
  84. on_construct = signs.on_construct,
  85. after_place_node = signs.after_place_node,
  86. on_receive_fields = signs.on_receive_fields
  87. })
  88. end