liquids.lua 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. local ani = {type="vertical_frames", aspect_w=16, aspect_h=16, length=1.5}--17
  2. minetest.register_node("sumpf:dirtywater_flowing", {
  3. drawtype = "flowingliquid",
  4. tiles = {"default_water.png"},
  5. special_tiles = {
  6. {name="sumpf_water_flowing.png", backface_culling=false, animation=ani},
  7. {name="sumpf_water_flowing.png", backface_culling=true, animation=ani}
  8. },
  9. use_texture_alpha = "blend",
  10. paramtype = "light",
  11. walkable = false,
  12. pointable = false,
  13. diggable = false,
  14. buildable_to = true,
  15. drop = "",
  16. liquidtype = "flowing",
  17. liquid_alternative_flowing = "sumpf:dirtywater_flowing",
  18. liquid_alternative_source = "sumpf:dirtywater_source",
  19. liquid_viscosity = 1,
  20. post_effect_color = {a=64, r=70, g=90, b=120},
  21. groups = {water=3, liquid=3, puts_out_fire=1, not_in_creative_inventory=1},
  22. })
  23. minetest.register_node("sumpf:dirtywater_source", {
  24. description = "swampwater",
  25. drawtype = "liquid",
  26. tiles = {
  27. {name="sumpf_water_source.png", animation=ani},
  28. {name="sumpf_water_source.png", animation=ani},
  29. {name="sumpf_water_flowing.png", animation=ani}
  30. },
  31. special_tiles = {{name="sumpf_water_source.png", animation=ani, backface_culling=false},},
  32. use_texture_alpha = "blend",
  33. paramtype = "light",
  34. walkable = false,
  35. pointable = false,
  36. diggable = false,
  37. buildable_to = true,
  38. liquidtype = "source",
  39. liquid_alternative_flowing = "sumpf:dirtywater_flowing",
  40. liquid_alternative_source = "sumpf:dirtywater_source",
  41. liquid_viscosity = 1,
  42. post_effect_color = {a=64, r=70, g=90, b=120},
  43. groups = {water=3, liquid=3, puts_out_fire=1},
  44. })
  45. if minetest.global_exists("bucket") then
  46. bucket.register_liquid(
  47. "sumpf:dirtywater_source",
  48. "sumpf:dirtywater_flowing",
  49. "sumpf:bucket_dirtywater",
  50. "bucket.png^sumpf_bucket_dirtywater.png",
  51. "swampwater bucket"
  52. )
  53. end