summaryrefslogtreecommitdiff
path: root/games/minimal/mods/testnodes/liquids.lua
diff options
context:
space:
mode:
authorWuzzy <wuzzy2@mail.ru>2020-05-24 15:46:26 +0200
committerGitHub <noreply@github.com>2020-05-24 14:46:26 +0100
commit6456aba73f0ef3f2fa7fd2b2a69cfdf8624afe23 (patch)
treef2bada583c6f4d3032f28b2627bf052174f0a847 /games/minimal/mods/testnodes/liquids.lua
parenta9b74f4c3966ad38c2f9a97364d3fdda0e514c93 (diff)
downloadminetest-6456aba73f0ef3f2fa7fd2b2a69cfdf8624afe23.tar.gz
minetest-6456aba73f0ef3f2fa7fd2b2a69cfdf8624afe23.tar.bz2
minetest-6456aba73f0ef3f2fa7fd2b2a69cfdf8624afe23.zip
Replacement for Minimal Development Test (PR) (#9450)
Diffstat (limited to 'games/minimal/mods/testnodes/liquids.lua')
-rw-r--r--games/minimal/mods/testnodes/liquids.lua91
1 files changed, 91 insertions, 0 deletions
diff --git a/games/minimal/mods/testnodes/liquids.lua b/games/minimal/mods/testnodes/liquids.lua
new file mode 100644
index 000000000..e316782ad
--- /dev/null
+++ b/games/minimal/mods/testnodes/liquids.lua
@@ -0,0 +1,91 @@
+-- Add liquids for ranges and viscosity levels 0-8
+
+for d=0, 8 do
+ minetest.register_node("testnodes:rliquid_"..d, {
+ description = "Test Liquid Source, Range "..d,
+ drawtype = "liquid",
+ tiles = {"testnodes_liquidsource_r"..d..".png"},
+ special_tiles = {
+ {name = "testnodes_liquidsource_r"..d..".png", backface_culling = false},
+ {name = "testnodes_liquidsource_r"..d..".png", backface_culling = true},
+ },
+ alpha = 192,
+ paramtype = "light",
+ walkable = false,
+ pointable = false,
+ diggable = false,
+ buildable_to = true,
+ is_ground_content = false,
+ liquidtype = "source",
+ liquid_alternative_flowing = "testnodes:rliquid_flowing_"..d,
+ liquid_alternative_source = "testnodes:rliquid_"..d,
+ liquid_range = d,
+ })
+
+ minetest.register_node("testnodes:rliquid_flowing_"..d, {
+ description = "Flowing Test Liquid, Range "..d,
+ drawtype = "flowingliquid",
+ tiles = {"testnodes_liquidflowing_r"..d..".png"},
+ special_tiles = {
+ {name = "testnodes_liquidflowing_r"..d..".png", backface_culling = false},
+ {name = "testnodes_liquidflowing_r"..d..".png", backface_culling = false},
+ },
+ alpha = 192,
+ paramtype = "light",
+ paramtype2 = "flowingliquid",
+ walkable = false,
+ pointable = false,
+ diggable = false,
+ buildable_to = true,
+ is_ground_content = false,
+ liquidtype = "flowing",
+ liquid_alternative_flowing = "testnodes:rliquid_flowing_"..d,
+ liquid_alternative_source = "testnodes:rliquid_"..d,
+ liquid_range = d,
+ })
+
+ local mod = "^[colorize:#000000:127"
+ minetest.register_node("testnodes:vliquid_"..d, {
+ description = "Test Liquid Source, Viscosity "..d,
+ drawtype = "liquid",
+ tiles = {"testnodes_liquidsource_r"..d..".png"..mod},
+ special_tiles = {
+ {name = "testnodes_liquidsource_r"..d..".png"..mod, backface_culling = false},
+ {name = "testnodes_liquidsource_r"..d..".png"..mod, backface_culling = true},
+ },
+ alpha = 192,
+ paramtype = "light",
+ walkable = false,
+ pointable = false,
+ diggable = false,
+ buildable_to = true,
+ is_ground_content = false,
+ liquidtype = "source",
+ liquid_alternative_flowing = "testnodes:vliquid_flowing_"..d,
+ liquid_alternative_source = "testnodes:vliquid_"..d,
+ liquid_viscosity = d,
+ })
+
+ minetest.register_node("testnodes:vliquid_flowing_"..d, {
+ description = "Flowing Test Liquid, Viscosity "..d,
+ drawtype = "flowingliquid",
+ tiles = {"testnodes_liquidflowing_r"..d..".png"..mod},
+ special_tiles = {
+ {name = "testnodes_liquidflowing_r"..d..".png"..mod, backface_culling = false},
+ {name = "testnodes_liquidflowing_r"..d..".png"..mod, backface_culling = false},
+ },
+ alpha = 192,
+ paramtype = "light",
+ paramtype2 = "flowingliquid",
+ walkable = false,
+ pointable = false,
+ diggable = false,
+ buildable_to = true,
+ is_ground_content = false,
+ liquidtype = "flowing",
+ liquid_alternative_flowing = "testnodes:vliquid_flowing_"..d,
+ liquid_alternative_source = "testnodes:vliquid_"..d,
+ liquid_viscosity = d,
+ })
+
+end