glass_breaking.lua 967 B

12345678910111213141516171819202122232425262728293031
  1. minetest.register_craftitem("rangedweapons:glass_shards", {
  2. description = "" ..core.colorize("#35cdff","Glass shards\n")..core.colorize("#FFFFFF", "3 of those, can be crafted into a file of glass fragments"),
  3. inventory_image = "rangedweapons_glass_shards.png",
  4. })
  5. minetest.register_craft({
  6. output = "vessels:glass_fragments",
  7. recipe = {
  8. {"rangedweapons:glass_shards", "rangedweapons:glass_shards", "rangedweapons:glass_shards"},
  9. }
  10. })
  11. minetest.register_node("rangedweapons:broken_glass", {
  12. description = "Broken glass",
  13. drawtype = "glasslike",
  14. tiles = {
  15. "rangedweapons_broken_glass.png"
  16. },
  17. paramtype = "light",
  18. walkable = false,
  19. is_ground_content = false,
  20. liquidtype = "source",
  21. liquid_alternative_flowing = "rangedweapons:broken_glass",
  22. liquid_alternative_source = "rangedweapons:broken_glass",
  23. liquid_viscosity = 7,
  24. alpha = 160,
  25. liquid_range= 0,
  26. liquid_renewable = false,
  27. damage_per_second = 2,
  28. groups = {oddly_breakable_by_hand = 3},
  29. })