nodes.lua 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. local MT = minetest
  2. local vMod = vm_lighting_wand
  3. local locate = vMod.locate
  4. vMod.air_light = vMod.modname .. ":air_light"
  5. vMod.water_light = vMod.modname .. ":water_light"
  6. -- fake air node with a light.
  7. MT.register_node(
  8. vMod.air_light,
  9. {
  10. description = locate("Air Light"),
  11. drawtype = "airlike",
  12. walkable = false,
  13. pointable = false,
  14. diggable = false,
  15. paramtype = "light",
  16. drop = {},
  17. groups = {not_in_creative_inventory = 1, [vMod.modname .. "_air_light"] = 1},
  18. sunlight_propagates = true,
  19. can_dig = false,
  20. buildable_to = true,
  21. light_source = 14,
  22. selection_box = {
  23. type = "fixed",
  24. fixed = {0, 0, 0, 0, 0, 0}
  25. }
  26. }
  27. )
  28. -- fake water node with a light, it doesnt flow
  29. MT.register_node(
  30. vMod.water_light,
  31. {
  32. description = locate("Water Light"),
  33. drawtype = "liquid",
  34. waving = 3,
  35. tiles = {
  36. {
  37. name = "default_water_source_animated.png",
  38. backface_culling = false,
  39. animation = {
  40. type = "vertical_frames",
  41. aspect_w = 16,
  42. aspect_h = 16,
  43. length = 2.0
  44. }
  45. },
  46. {
  47. name = "default_water_source_animated.png",
  48. backface_culling = true,
  49. animation = {
  50. type = "vertical_frames",
  51. aspect_w = 16,
  52. aspect_h = 16,
  53. length = 2.0
  54. }
  55. }
  56. },
  57. groups = {not_in_creative_inventory = 1, [vMod.modname .. "_water_light"] = 1},
  58. liquid_renewable = false,
  59. paramtype = "light",
  60. light_source = 14,
  61. walkable = false,
  62. pointable = false,
  63. diggable = false,
  64. buildable_to = true,
  65. is_ground_content = false,
  66. drop = "",
  67. drowning = 1,
  68. liquidtype = "none",
  69. post_effect_color = {a = 103, r = 30, g = 60, b = 90}
  70. }
  71. )