1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
-- 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,
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,
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,
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,
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
|