outdoor.lua 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. minetest.register_node('lights:street_light_base', {
  2. description = 'Street Light Base',
  3. drawtype = 'mesh',
  4. mesh = 'lights_street_light_base.obj',
  5. tiles = {'lights_street_light_base.png'},
  6. paramtype = 'light',
  7. selection_box = {type = 'fixed',
  8. fixed = {
  9. {-.2, -.5, -.2, .2, .5, .2},}},
  10. collision_box = {type = 'fixed',
  11. fixed = {
  12. {-.2, -.5, -.2, .2, .5, .2},}},
  13. groups = {breakable=1},
  14. })
  15. minetest.register_node('lights:street_light_top', {
  16. description = 'Street Light top',
  17. drawtype = 'mesh',
  18. mesh = 'lights_street_light_top.obj',
  19. tiles = {'lights_street_light_top.png'},
  20. paramtype = 'light',
  21. selection_box = {type = 'fixed',
  22. fixed = {
  23. {-.125, -.5, -.125, .125, .5, .125},}},
  24. collision_box = {type = 'fixed',
  25. fixed = {
  26. {-.125, -.5, -.125, .125, .5, .125},}},
  27. groups = {breakable=1},
  28. })
  29. minetest.register_node('lights:street_light_light', {
  30. description = 'Street Light',
  31. drawtype = 'mesh',
  32. mesh = 'lights_street_light_light.obj',
  33. tiles = {'lights_street_light_light.png'},
  34. paramtype = 'light',
  35. paramtype2 = 'facedir',
  36. light_source = 14,
  37. selection_box = {type = 'fixed',
  38. fixed = {
  39. {-.2, .2, -.2, .2, .5, .75},}},
  40. collision_box = {type = 'fixed',
  41. fixed = {
  42. {-.2, .2, -.2, .2, .5, .75},}},
  43. groups = {breakable=1},
  44. on_construct = function(pos)
  45. lights.drop_light(pos, 14)
  46. end,
  47. on_destruct = lights.dropped_light_removal
  48. })