neon.lua 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. local ceiling_tube_col = {
  2. type = 'fixed',
  3. fixed = {-.4, -.4, -.4, .4, -.5, .4}, -- Right, Bottom, Back, Left, Top, Front
  4. }
  5. local neon_light_level = 8
  6. minetest.register_node('lights:ceiling_tube_end_long', {
  7. description = 'Ceiling Tube (Long End)',
  8. drawtype = 'mesh',
  9. mesh = 'lights_ceiling_tube_end_long.obj',
  10. tiles = {'lights_ceiling_tube.png'},
  11. groups = {breakable=1},
  12. light_source = neon_light_level,
  13. paramtype = 'light',
  14. paramtype2 = 'facedir',
  15. selection_box = ceiling_tube_col,
  16. collision_box = ceiling_tube_col,
  17. on_place = minetest.rotate_node,
  18. })
  19. minetest.register_node('lights:ceiling_tube_end_short', {
  20. description = 'Ceiling Tube (Short End)',
  21. drawtype = 'mesh',
  22. mesh = 'lights_ceiling_tube_end_short.obj',
  23. tiles = {'lights_ceiling_tube.png'},
  24. groups = {breakable=1},
  25. light_source = neon_light_level,
  26. paramtype = 'light',
  27. paramtype2 = 'facedir',
  28. selection_box = ceiling_tube_col,
  29. collision_box = ceiling_tube_col,
  30. on_place = minetest.rotate_node,
  31. })
  32. minetest.register_node('lights:ceiling_tube_straight', {
  33. description = 'Ceiling Tube',
  34. drawtype = 'mesh',
  35. mesh = 'lights_ceiling_tube_straight.obj',
  36. tiles = {'lights_ceiling_tube.png'},
  37. groups = {breakable=1},
  38. light_source = neon_light_level,
  39. paramtype = 'light',
  40. paramtype2 = 'facedir',
  41. selection_box = ceiling_tube_col,
  42. collision_box = ceiling_tube_col,
  43. on_place = minetest.rotate_node,
  44. })
  45. minetest.register_node('lights:ceiling_tube_T', {
  46. description = 'Ceiling Tube (T-Junction)',
  47. drawtype = 'mesh',
  48. mesh = 'lights_ceiling_tube_T.obj',
  49. tiles = {'lights_ceiling_tube.png'},
  50. groups = {breakable=1},
  51. light_source = neon_light_level,
  52. paramtype = 'light',
  53. paramtype2 = 'facedir',
  54. selection_box = ceiling_tube_col,
  55. collision_box = ceiling_tube_col,
  56. on_place = minetest.rotate_node,
  57. })
  58. minetest.register_node('lights:ceiling_tube_turn', {
  59. description = 'Ceiling Tube (90 Degree Turn)',
  60. drawtype = 'mesh',
  61. mesh = 'lights_ceiling_tube_turn.obj',
  62. tiles = {'lights_ceiling_tube.png'},
  63. groups = {breakable=1},
  64. light_source = neon_light_level,
  65. paramtype = 'light',
  66. paramtype2 = 'facedir',
  67. selection_box = ceiling_tube_col,
  68. collision_box = ceiling_tube_col,
  69. on_place = minetest.rotate_node,
  70. })
  71. minetest.register_node('lights:ceiling_tube_U', {
  72. description = 'Ceiling Tube (U)',
  73. drawtype = 'mesh',
  74. mesh = 'lights_ceiling_tube_U.obj',
  75. tiles = {'lights_ceiling_tube.png'},
  76. groups = {breakable=1},
  77. light_source = neon_light_level,
  78. paramtype = 'light',
  79. paramtype2 = 'facedir',
  80. selection_box = ceiling_tube_col,
  81. collision_box = ceiling_tube_col,
  82. on_place = minetest.rotate_node,
  83. })
  84. minetest.register_node('lights:ceiling_tube_X', {
  85. description = 'Ceiling Tube (4-way Junction)',
  86. drawtype = 'mesh',
  87. mesh = 'lights_ceiling_tube_X.obj',
  88. tiles = {'lights_ceiling_tube.png'},
  89. groups = {breakable=1},
  90. light_source = neon_light_level,
  91. paramtype = 'light',
  92. paramtype2 = 'facedir',
  93. selection_box = ceiling_tube_col,
  94. collision_box = ceiling_tube_col,
  95. on_place = minetest.rotate_node,
  96. })