]> git.lizzy.rs Git - dragonfireclient.git/blob - games/devtest/mods/testnodes/liquids.lua
devtest: Fix deprecated alpha usage
[dragonfireclient.git] / games / devtest / mods / testnodes / liquids.lua
1 -- Add liquids for ranges and viscosity levels 0-8
2
3 for d=0, 8 do
4         minetest.register_node("testnodes:rliquid_"..d, {
5                 description = "Test Liquid Source, Range "..d,
6                 drawtype = "liquid",
7                 tiles = {"testnodes_liquidsource_r"..d..".png"},
8                 special_tiles = {
9                         {name = "testnodes_liquidsource_r"..d..".png", backface_culling = false},
10                         {name = "testnodes_liquidsource_r"..d..".png", backface_culling = true},
11                 },
12                 use_texture_alpha = "blend",
13                 paramtype = "light",
14                 walkable = false,
15                 buildable_to = true,
16                 is_ground_content = false,
17                 liquidtype = "source",
18                 liquid_alternative_flowing = "testnodes:rliquid_flowing_"..d,
19                 liquid_alternative_source = "testnodes:rliquid_"..d,
20                 liquid_range = d,
21         })
22
23         minetest.register_node("testnodes:rliquid_flowing_"..d, {
24                 description = "Flowing Test Liquid, Range "..d,
25                 drawtype = "flowingliquid",
26                 tiles = {"testnodes_liquidflowing_r"..d..".png"},
27                 special_tiles = {
28                         {name = "testnodes_liquidflowing_r"..d..".png", backface_culling = false},
29                         {name = "testnodes_liquidflowing_r"..d..".png", backface_culling = false},
30                 },
31                 use_texture_alpha = "blend",
32                 paramtype = "light",
33                 paramtype2 = "flowingliquid",
34                 walkable = false,
35                 buildable_to = true,
36                 is_ground_content = false,
37                 liquidtype = "flowing",
38                 liquid_alternative_flowing = "testnodes:rliquid_flowing_"..d,
39                 liquid_alternative_source = "testnodes:rliquid_"..d,
40                 liquid_range = d,
41         })
42
43         local mod = "^[colorize:#000000:127"
44         minetest.register_node("testnodes:vliquid_"..d, {
45                 description = "Test Liquid Source, Viscosity "..d,
46                 drawtype = "liquid",
47                 tiles = {"testnodes_liquidsource_r"..d..".png"..mod},
48                 special_tiles = {
49                         {name = "testnodes_liquidsource_r"..d..".png"..mod, backface_culling = false},
50                         {name = "testnodes_liquidsource_r"..d..".png"..mod, backface_culling = true},
51                 },
52                 use_texture_alpha = "blend",
53                 paramtype = "light",
54                 walkable = false,
55                 buildable_to = true,
56                 is_ground_content = false,
57                 liquidtype = "source",
58                 liquid_alternative_flowing = "testnodes:vliquid_flowing_"..d,
59                 liquid_alternative_source = "testnodes:vliquid_"..d,
60                 liquid_viscosity = d,
61         })
62
63         minetest.register_node("testnodes:vliquid_flowing_"..d, {
64                 description = "Flowing Test Liquid, Viscosity "..d,
65                 drawtype = "flowingliquid",
66                 tiles = {"testnodes_liquidflowing_r"..d..".png"..mod},
67                 special_tiles = {
68                         {name = "testnodes_liquidflowing_r"..d..".png"..mod, backface_culling = false},
69                         {name = "testnodes_liquidflowing_r"..d..".png"..mod, backface_culling = false},
70                 },
71                 use_texture_alpha = "blend",
72                 paramtype = "light",
73                 paramtype2 = "flowingliquid",
74                 walkable = false,
75                 buildable_to = true,
76                 is_ground_content = false,
77                 liquidtype = "flowing",
78                 liquid_alternative_flowing = "testnodes:vliquid_flowing_"..d,
79                 liquid_alternative_source = "testnodes:vliquid_"..d,
80                 liquid_viscosity = d,
81         })
82
83 end