2020-05-24 15:46:26 +02:00
|
|
|
-- Add liquids for ranges and viscosity levels 0-8
|
|
|
|
|
|
|
|
for d=0, 8 do
|
2022-10-09 14:05:22 +02:00
|
|
|
local tt_normal
|
|
|
|
if d == 0 then
|
|
|
|
tt_normal = "\n".."Swimmable, renewable liquid"
|
|
|
|
else
|
|
|
|
tt_normal = "\n".."Swimmable, spreading, renewable liquid"
|
|
|
|
end
|
2020-05-24 15:46:26 +02:00
|
|
|
minetest.register_node("testnodes:rliquid_"..d, {
|
2022-10-09 14:05:22 +02:00
|
|
|
description = "Test Liquid Source, Range "..d..
|
|
|
|
tt_normal,
|
2020-05-24 15:46:26 +02:00
|
|
|
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},
|
|
|
|
},
|
2021-01-17 02:25:33 +01:00
|
|
|
use_texture_alpha = "blend",
|
2020-05-24 15:46:26 +02:00
|
|
|
paramtype = "light",
|
|
|
|
walkable = 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, {
|
2022-10-09 14:05:22 +02:00
|
|
|
description = "Flowing Test Liquid, Range "..d..
|
|
|
|
tt_normal,
|
2020-05-24 15:46:26 +02:00
|
|
|
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},
|
|
|
|
},
|
2021-01-17 02:25:33 +01:00
|
|
|
use_texture_alpha = "blend",
|
2020-05-24 15:46:26 +02:00
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "flowingliquid",
|
|
|
|
walkable = 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,
|
|
|
|
})
|
|
|
|
|
2021-10-01 16:21:24 +02:00
|
|
|
if d <= 7 then
|
|
|
|
|
2022-10-09 14:05:22 +02:00
|
|
|
local tt_reduced = ""
|
|
|
|
if d > 0 then
|
|
|
|
tt_reduced = "\n".."Reduced swimming/spreading speed"
|
|
|
|
end
|
|
|
|
|
2020-05-24 15:46:26 +02:00
|
|
|
local mod = "^[colorize:#000000:127"
|
|
|
|
minetest.register_node("testnodes:vliquid_"..d, {
|
2022-10-09 14:05:22 +02:00
|
|
|
description = "Test Liquid Source, Viscosity/Resistance "..d.."\n"..
|
|
|
|
"Swimmable, spreading, renewable liquid"..
|
|
|
|
tt_reduced,
|
2020-05-24 15:46:26 +02:00
|
|
|
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},
|
|
|
|
},
|
2021-01-17 02:25:33 +01:00
|
|
|
use_texture_alpha = "blend",
|
2020-05-24 15:46:26 +02:00
|
|
|
paramtype = "light",
|
|
|
|
walkable = 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, {
|
2022-10-09 14:05:22 +02:00
|
|
|
description = "Flowing Test Liquid, Viscosity/Resistance "..d.."\n"..
|
|
|
|
"Swimmable, spreading, renewable liquid"..
|
|
|
|
tt_reduced,
|
2020-05-24 15:46:26 +02:00
|
|
|
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},
|
|
|
|
},
|
2021-01-17 02:25:33 +01:00
|
|
|
use_texture_alpha = "blend",
|
2020-05-24 15:46:26 +02:00
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "flowingliquid",
|
|
|
|
walkable = 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,
|
|
|
|
})
|
|
|
|
|
2021-10-01 16:21:24 +02:00
|
|
|
mod = "^[colorize:#000000:192"
|
|
|
|
local v = 4
|
|
|
|
minetest.register_node("testnodes:vrliquid_"..d, {
|
2022-10-09 14:05:22 +02:00
|
|
|
description = "Test Liquid Source, Viscosity "..v..", Resistance "..d.."\n"..
|
|
|
|
"Swimmable, spreading, renewable liquid"..
|
|
|
|
tt_reduced,
|
2021-10-01 16:21:24 +02:00
|
|
|
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},
|
|
|
|
},
|
|
|
|
use_texture_alpha = "blend",
|
|
|
|
paramtype = "light",
|
|
|
|
walkable = false,
|
|
|
|
pointable = false,
|
|
|
|
diggable = false,
|
|
|
|
buildable_to = true,
|
|
|
|
is_ground_content = false,
|
|
|
|
liquidtype = "source",
|
|
|
|
liquid_alternative_flowing = "testnodes:vrliquid_flowing_"..d,
|
|
|
|
liquid_alternative_source = "testnodes:vrliquid_"..d,
|
|
|
|
liquid_viscosity = v,
|
|
|
|
move_resistance = d,
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("testnodes:vrliquid_flowing_"..d, {
|
2022-10-09 14:05:22 +02:00
|
|
|
description = "Flowing Test Liquid, Viscosity "..v..", Resistance "..d.."\n"..
|
|
|
|
"Swimmable, spreading, renewable liquid"..
|
|
|
|
tt_reduced,
|
2021-10-01 16:21:24 +02:00
|
|
|
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},
|
|
|
|
},
|
|
|
|
use_texture_alpha = "blend",
|
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "flowingliquid",
|
|
|
|
walkable = false,
|
|
|
|
pointable = false,
|
|
|
|
diggable = false,
|
|
|
|
buildable_to = true,
|
|
|
|
is_ground_content = false,
|
|
|
|
liquidtype = "flowing",
|
|
|
|
liquid_alternative_flowing = "testnodes:vrliquid_flowing_"..d,
|
|
|
|
liquid_alternative_source = "testnodes:vrliquid_"..d,
|
|
|
|
liquid_viscosity = v,
|
|
|
|
move_resistance = d,
|
|
|
|
})
|
|
|
|
|
|
|
|
end
|
|
|
|
|
2020-05-24 15:46:26 +02:00
|
|
|
end
|