aboutsummaryrefslogtreecommitdiff
path: root/games/devtest/mods/testnodes
diff options
context:
space:
mode:
authorWuzzy <Wuzzy@disroot.org>2022-05-27 19:39:36 +0000
committerGitHub <noreply@github.com>2022-05-27 21:39:36 +0200
commitfe299e24d6ad5bb58e077ec372737b117ac6cf94 (patch)
treed527b6ecaaf5f0d821e7cc256945456b8c6396a5 /games/devtest/mods/testnodes
parentef22c0206f225dbccd67bff9fb888867c63039b3 (diff)
downloadminetest-fe299e24d6ad5bb58e077ec372737b117ac6cf94.tar.gz
minetest-fe299e24d6ad5bb58e077ec372737b117ac6cf94.tar.bz2
minetest-fe299e24d6ad5bb58e077ec372737b117ac6cf94.zip
DevTest: Add nodes and items for testing overlays (#12304)
Diffstat (limited to 'games/devtest/mods/testnodes')
-rw-r--r--games/devtest/mods/testnodes/init.lua1
-rw-r--r--games/devtest/mods/testnodes/overlays.lua93
-rw-r--r--games/devtest/mods/testnodes/textures/testnodes_overlay.pngbin0 -> 153 bytes
-rw-r--r--games/devtest/mods/testnodes/textures/testnodes_overlayable.pngbin0 -> 87 bytes
4 files changed, 94 insertions, 0 deletions
diff --git a/games/devtest/mods/testnodes/init.lua b/games/devtest/mods/testnodes/init.lua
index 92e2c5630..d355c4278 100644
--- a/games/devtest/mods/testnodes/init.lua
+++ b/games/devtest/mods/testnodes/init.lua
@@ -8,3 +8,4 @@ dofile(path.."/properties.lua")
dofile(path.."/liquids.lua")
dofile(path.."/light.lua")
dofile(path.."/textures.lua")
+dofile(path.."/overlays.lua")
diff --git a/games/devtest/mods/testnodes/overlays.lua b/games/devtest/mods/testnodes/overlays.lua
new file mode 100644
index 000000000..294e06a16
--- /dev/null
+++ b/games/devtest/mods/testnodes/overlays.lua
@@ -0,0 +1,93 @@
+local S = minetest.get_translator("testnodes")
+
+minetest.register_node("testnodes:overlay", {
+ description = S("Texture Overlay Test Node") .. "\n" ..
+ S("Uncolorized"),
+ tiles = {{name = "testnodes_overlayable.png"}},
+ overlay_tiles = {{name = "testnodes_overlay.png"}},
+ groups = { dig_immediate = 2 },
+})
+minetest.register_node("testnodes:overlay_color_all", {
+ description = S("Texture Overlay Test Node, Colorized") .. "\n" ..
+ S("param2 changes color"),
+ tiles = {{name = "testnodes_overlayable.png"}},
+ overlay_tiles = {{name = "testnodes_overlay.png"}},
+ paramtype2 = "color",
+ palette = "testnodes_palette_full.png",
+
+
+ groups = { dig_immediate = 2 },
+})
+minetest.register_node("testnodes:overlay_color_overlay", {
+ description = S("Texture Overlay Test Node, Colorized Overlay") .. "\n" ..
+ S("param2 changes color of overlay"),
+ tiles = {{name = "testnodes_overlayable.png", color="white"}},
+ overlay_tiles = {{name = "testnodes_overlay.png"}},
+ paramtype2 = "color",
+ palette = "testnodes_palette_full.png",
+
+
+ groups = { dig_immediate = 2 },
+})
+minetest.register_node("testnodes:overlay_color_overlayed", {
+ description = S("Texture Overlay Test Node, Colorized Base") .. "\n" ..
+ S("param2 changes color of base texture"),
+ tiles = {{name = "testnodes_overlayable.png"}},
+ overlay_tiles = {{name = "testnodes_overlay.png", color="white"}},
+ paramtype2 = "color",
+ palette = "testnodes_palette_full.png",
+
+
+ groups = { dig_immediate = 2 },
+})
+
+local global_overlay_color = "#FF2000"
+minetest.register_node("testnodes:overlay_global", {
+ description = S("Texture Overlay Test Node, Global Color") .. "\n" ..
+ S("Global color = @1", global_overlay_color),
+ tiles = {{name = "testnodes_overlayable.png"}},
+ overlay_tiles = {{name = "testnodes_overlay.png"}},
+ color = global_overlay_color,
+
+
+ groups = { dig_immediate = 2 },
+})
+minetest.register_node("testnodes:overlay_global_color_all", {
+ description = S("Texture Overlay Test Node, Global Color + Colorized") .. "\n" ..
+ S("Global color = @1", global_overlay_color) .. "\n" ..
+ S("param2 changes color"),
+ tiles = {{name = "testnodes_overlayable.png"}},
+ overlay_tiles = {{name = "testnodes_overlay.png"}},
+ color = global_overlay_color,
+ paramtype2 = "color",
+ palette = "testnodes_palette_full.png",
+
+
+ groups = { dig_immediate = 2 },
+})
+minetest.register_node("testnodes:overlay_global_color_overlay", {
+ description = S("Texture Overlay Test Node, Global Color + Colorized Overlay") .. "\n" ..
+ S("Global color = @1", global_overlay_color) .. "\n" ..
+ S("param2 changes color of overlay"),
+ tiles = {{name = "testnodes_overlayable.png", color=global_overlay_color}},
+ overlay_tiles = {{name = "testnodes_overlay.png"}},
+ color = global_overlay_color,
+ paramtype2 = "color",
+ palette = "testnodes_palette_full.png",
+
+
+ groups = { dig_immediate = 2 },
+})
+minetest.register_node("testnodes:overlay_global_color_overlayed", {
+ description = S("Texture Overlay Test Node, Global Color + Colorized Base") .. "\n" ..
+ S("Global color = @1", global_overlay_color) .. "\n" ..
+ S("param2 changes color of base texture"),
+ tiles = {{name = "testnodes_overlayable.png"}},
+ overlay_tiles = {{name = "testnodes_overlay.png", color=global_overlay_color}},
+ color = global_overlay_color,
+ paramtype2 = "color",
+ palette = "testnodes_palette_full.png",
+
+
+ groups = { dig_immediate = 2 },
+})
diff --git a/games/devtest/mods/testnodes/textures/testnodes_overlay.png b/games/devtest/mods/testnodes/textures/testnodes_overlay.png
new file mode 100644
index 000000000..1c69b5e08
--- /dev/null
+++ b/games/devtest/mods/testnodes/textures/testnodes_overlay.png
Binary files differ
diff --git a/games/devtest/mods/testnodes/textures/testnodes_overlayable.png b/games/devtest/mods/testnodes/textures/testnodes_overlayable.png
new file mode 100644
index 000000000..431bc94f4
--- /dev/null
+++ b/games/devtest/mods/testnodes/textures/testnodes_overlayable.png
Binary files differ