overlays.lua 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. local S = core.get_translator("testnodes")
  2. core.register_node("testnodes:overlay", {
  3. description = S("Texture Overlay Test Node") .. "\n" ..
  4. S("Uncolorized"),
  5. tiles = {{name = "testnodes_overlayable.png"}},
  6. overlay_tiles = {{name = "testnodes_overlay.png"}},
  7. groups = { dig_immediate = 2 },
  8. })
  9. core.register_node("testnodes:overlay_color_all", {
  10. description = S("Texture Overlay Test Node, Colorized") .. "\n" ..
  11. S("param2 changes color"),
  12. tiles = {{name = "testnodes_overlayable.png"}},
  13. overlay_tiles = {{name = "testnodes_overlay.png"}},
  14. paramtype2 = "color",
  15. palette = "testnodes_palette_full.png",
  16. groups = { dig_immediate = 2 },
  17. })
  18. core.register_node("testnodes:overlay_color_overlay", {
  19. description = S("Texture Overlay Test Node, Colorized Overlay") .. "\n" ..
  20. S("param2 changes color of overlay"),
  21. tiles = {{name = "testnodes_overlayable.png", color="white"}},
  22. overlay_tiles = {{name = "testnodes_overlay.png"}},
  23. paramtype2 = "color",
  24. palette = "testnodes_palette_full.png",
  25. groups = { dig_immediate = 2 },
  26. })
  27. core.register_node("testnodes:overlay_color_overlayed", {
  28. description = S("Texture Overlay Test Node, Colorized Base") .. "\n" ..
  29. S("param2 changes color of base texture"),
  30. tiles = {{name = "testnodes_overlayable.png"}},
  31. overlay_tiles = {{name = "testnodes_overlay.png", color="white"}},
  32. paramtype2 = "color",
  33. palette = "testnodes_palette_full.png",
  34. groups = { dig_immediate = 2 },
  35. })
  36. local global_overlay_color = "#FF2000"
  37. core.register_node("testnodes:overlay_global", {
  38. description = S("Texture Overlay Test Node, Global Color") .. "\n" ..
  39. S("Global color = @1", global_overlay_color),
  40. tiles = {{name = "testnodes_overlayable.png"}},
  41. overlay_tiles = {{name = "testnodes_overlay.png"}},
  42. color = global_overlay_color,
  43. groups = { dig_immediate = 2 },
  44. })
  45. core.register_node("testnodes:overlay_global_color_all", {
  46. description = S("Texture Overlay Test Node, Global Color + Colorized") .. "\n" ..
  47. S("Global color = @1", global_overlay_color) .. "\n" ..
  48. S("param2 changes color"),
  49. tiles = {{name = "testnodes_overlayable.png"}},
  50. overlay_tiles = {{name = "testnodes_overlay.png"}},
  51. color = global_overlay_color,
  52. paramtype2 = "color",
  53. palette = "testnodes_palette_full.png",
  54. groups = { dig_immediate = 2 },
  55. })
  56. core.register_node("testnodes:overlay_global_color_overlay", {
  57. description = S("Texture Overlay Test Node, Global Color + Colorized Overlay") .. "\n" ..
  58. S("Global color = @1", global_overlay_color) .. "\n" ..
  59. S("param2 changes color of overlay"),
  60. tiles = {{name = "testnodes_overlayable.png", color=global_overlay_color}},
  61. overlay_tiles = {{name = "testnodes_overlay.png"}},
  62. color = global_overlay_color,
  63. paramtype2 = "color",
  64. palette = "testnodes_palette_full.png",
  65. groups = { dig_immediate = 2 },
  66. })
  67. core.register_node("testnodes:overlay_global_color_overlayed", {
  68. description = S("Texture Overlay Test Node, Global Color + Colorized Base") .. "\n" ..
  69. S("Global color = @1", global_overlay_color) .. "\n" ..
  70. S("param2 changes color of base texture"),
  71. tiles = {{name = "testnodes_overlayable.png"}},
  72. overlay_tiles = {{name = "testnodes_overlay.png", color=global_overlay_color}},
  73. color = global_overlay_color,
  74. paramtype2 = "color",
  75. palette = "testnodes_palette_full.png",
  76. groups = { dig_immediate = 2 },
  77. })