meshes.lua 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  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. })
  97. local colbox_tube_light = {
  98. type = 'fixed',
  99. fixed = {
  100. {-.1, -.5, -.4, .1, -.4, .4},}}
  101. minetest.register_node('lights:tube_light', {
  102. description = 'Tube Light',
  103. drawtype = 'mesh',
  104. mesh = 'lights_tube_light.obj',
  105. paramtype = 'light',
  106. paramtype2 = 'facedir',
  107. light_source = 14,
  108. selection_box = colbox_tube_light,
  109. collision_box = colbox_tube_light,
  110. tiles = {'lights_tube_light.png'},
  111. groups = {breakable=1},
  112. on_place = minetest.rotate_node,
  113. })
  114. local colbox_post_light = {
  115. type = 'fixed',
  116. fixed = {
  117. {-.2, -.5, -.2, .2, -.4, .2},
  118. {-.125, -.4, -.125, .125, .425, .125},}}
  119. minetest.register_node('lights:scifi_post', {
  120. description = 'Scifi Post Light',
  121. drawtype = 'mesh',
  122. mesh = 'lights_scifi_post.obj',
  123. paramtype = 'light',
  124. paramtype2 = 'facedir',
  125. light_source = 14,
  126. selection_box = colbox_post_light,
  127. collision_box = colbox_post_light,
  128. tiles = {'lights_scifi_post.png'},
  129. groups = {breakable=1},
  130. on_place = minetest.rotate_node,
  131. })
  132. local colbox_plaque_light = {
  133. type = 'fixed',
  134. fixed = {
  135. {-.4, -.5, -.4, .4, -.4, .4},}}
  136. minetest.register_node('lights:plaque', {
  137. description = 'Scifi Plaque',
  138. drawtype = 'mesh',
  139. mesh = 'lights_plaque.obj',
  140. paramtype = 'light',
  141. paramtype2 = 'facedir',
  142. light_source = 14,
  143. selection_box = colbox_plaque_light,
  144. collision_box = colbox_plaque_light,
  145. tiles = {'lights_plaque.png'},
  146. groups = {breakable=1},
  147. on_place = minetest.rotate_node,
  148. })
  149. local colbox_corner_light = {
  150. type = 'fixed',
  151. fixed = {
  152. {-.25, -.5, .3, .25, -.3, .5},}}
  153. minetest.register_node('lights:corner', {
  154. description = 'Scifi inside Corner light',
  155. drawtype = 'mesh',
  156. mesh = 'lights_corner.obj',
  157. paramtype = 'light',
  158. paramtype2 = 'facedir',
  159. light_source = 10,
  160. selection_box = colbox_corner_light,
  161. collision_box = colbox_corner_light,
  162. tiles = {'lights_corner.png'},
  163. groups = {breakable=1},
  164. on_place = minetest.rotate_node,
  165. })