]> git.lizzy.rs Git - minetest.git/blob - games/devtest/mods/testnodes/meshes.lua
DevTest: Explain purpose of most items in tooltips (#12833)
[minetest.git] / games / devtest / mods / testnodes / meshes.lua
1 -- Meshes
2
3 local S = minetest.get_translator("testnodes")
4
5 local ocorner_cbox = {
6         type = "fixed",
7         fixed = {
8                 {-0.5,  -0.5,  -0.5,   0.5, -0.25, 0.5},
9                 {-0.5, -0.25, -0.25,  0.25,     0, 0.5},
10                 {-0.5,     0,     0,     0,  0.25, 0.5},
11                 {-0.5,  0.25,  0.25, -0.25,   0.5, 0.5}
12         }
13 }
14
15 local tall_pyr_cbox = {
16         type = "fixed",
17         fixed = {
18                 { -0.5,   -0.5,  -0.5,   0.5,  -0.25, 0.5 },
19                 { -0.375, -0.25, -0.375, 0.375, 0,    0.375},
20                 { -0.25,   0,    -0.25,  0.25,  0.25, 0.25},
21                 { -0.125,  0.25, -0.125, 0.125, 0.5,  0.125}
22         }
23 }
24
25 -- Normal mesh
26 minetest.register_node("testnodes:mesh", {
27         description = S("Mesh Test Node"),
28         drawtype = "mesh",
29         mesh = "testnodes_pyramid.obj",
30         tiles = {"testnodes_mesh_stripes2.png"},
31         paramtype = "light",
32         collision_box = tall_pyr_cbox,
33
34         groups = {dig_immediate=3},
35 })
36
37 -- Facedir mesh: outer corner slope
38 minetest.register_node("testnodes:mesh_facedir", {
39         description = S("Facedir Mesh Test Node").."\n"..
40                 S("param2 = facedir rotation (0..23)"),
41         drawtype = "mesh",
42         mesh = "testnodes_ocorner.obj",
43         tiles = {"testnodes_mesh_stripes.png"},
44         paramtype = "light",
45         paramtype2 = "facedir",
46         collision_box = ocorner_cbox,
47
48         groups = {dig_immediate=3},
49 })
50
51 minetest.register_node("testnodes:mesh_colorfacedir", {
52         description = S("Color Facedir Mesh Test Node").."\n"..
53                 S("param2 = color + facedir rotation (0..23, 32..55, ...)"),
54         drawtype = "mesh",
55         mesh = "testnodes_ocorner.obj",
56         tiles = {"testnodes_mesh_stripes3.png"},
57         paramtype = "light",
58         paramtype2 = "colorfacedir",
59         palette = "testnodes_palette_facedir.png",
60         collision_box = ocorner_cbox,
61
62         groups = {dig_immediate=3},
63 })
64
65 minetest.register_node("testnodes:mesh_4dir", {
66         description = S("4dir Mesh Test Node").."\n"..
67                 S("param2 = 4dir rotation (0..3)"),
68         drawtype = "mesh",
69         mesh = "testnodes_ocorner.obj",
70         tiles = {"testnodes_mesh_stripes.png"},
71         paramtype = "light",
72         paramtype2 = "4dir",
73         collision_box = ocorner_cbox,
74
75         groups = {dig_immediate=3},
76 })
77
78 minetest.register_node("testnodes:mesh_color4dir", {
79         description = S("Color 4dir Mesh Test Node").."\n"..
80                 S("param2 = color + 4dir rotation (0..255)"),
81         drawtype = "mesh",
82         mesh = "testnodes_ocorner.obj",
83         tiles = {"testnodes_mesh_stripes3.png"},
84         paramtype = "light",
85         paramtype2 = "color4dir",
86         palette = "testnodes_palette_4dir.png",
87         collision_box = ocorner_cbox,
88
89         groups = {dig_immediate=3},
90 })
91
92 -- Wallmounted mesh: pyramid
93 minetest.register_node("testnodes:mesh_wallmounted", {
94         description = S("Wallmounted Mesh Test Node").."\n"..
95                 S("param2 = wallmounted rotation (0..5)"),
96         drawtype = "mesh",
97         mesh = "testnodes_pyramid.obj",
98         tiles = {"testnodes_mesh_stripes2.png"},
99         paramtype = "light",
100         paramtype2 = "wallmounted",
101         collision_box = tall_pyr_cbox,
102
103         groups = {dig_immediate=3},
104 })
105
106 minetest.register_node("testnodes:mesh_colorwallmounted", {
107         description = S("Color Wallmounted Mesh Test Node").."\n"..
108                 S("param2 = color + wallmounted rotation (0..5, 8..13, ...)"),
109         drawtype = "mesh",
110         mesh = "testnodes_pyramid.obj",
111         tiles = {"testnodes_mesh_stripes3.png"},
112         paramtype = "light",
113         paramtype2 = "colorwallmounted",
114         palette = "testnodes_palette_wallmounted.png",
115         collision_box = tall_pyr_cbox,
116
117         groups = {dig_immediate=3},
118 })
119
120
121 minetest.register_node("testnodes:mesh_double", {
122         description = S("Double-sized Mesh Test Node"),
123         drawtype = "mesh",
124         mesh = "testnodes_pyramid.obj",
125         tiles = {"testnodes_mesh_stripes2.png"},
126         paramtype = "light",
127         collision_box = tall_pyr_cbox,
128         visual_scale = 2,
129
130         groups = {dig_immediate=3},
131 })
132 minetest.register_node("testnodes:mesh_half", {
133         description = S("Half-sized Mesh Test Node"),
134         drawtype = "mesh",
135         mesh = "testnodes_pyramid.obj",
136         tiles = {"testnodes_mesh_stripes2.png"},
137         paramtype = "light",
138         collision_box = tall_pyr_cbox,
139         visual_scale = 0.5,
140
141         groups = {dig_immediate=3},
142 })
143
144 minetest.register_node("testnodes:mesh_waving1", {
145         description = S("Plantlike-waving Mesh Test Node").."\n"..
146                 S("Waves if waving plants are enabled by client"),
147         drawtype = "mesh",
148         mesh = "testnodes_pyramid.obj",
149         tiles = {"testnodes_mesh_stripes4.png^[multiply:#B0FFB0"},
150         paramtype = "light",
151         collision_box = tall_pyr_cbox,
152         waving = 1,
153
154         groups = {dig_immediate=3},
155 })
156 minetest.register_node("testnodes:mesh_waving2", {
157         description = S("Leaflike-waving Mesh Test Node").."\n"..
158                 S("Waves if waving leaves are enabled by client"),
159         drawtype = "mesh",
160         mesh = "testnodes_pyramid.obj",
161         tiles = {"testnodes_mesh_stripes4.png^[multiply:#FFFFB0"},
162         paramtype = "light",
163         collision_box = tall_pyr_cbox,
164         waving = 2,
165
166         groups = {dig_immediate=3},
167 })
168 minetest.register_node("testnodes:mesh_waving3", {
169         description = S("Liquidlike-waving Mesh Test Node").."\n"..
170                 S("Waves if waving liquids are enabled by client"),
171         drawtype = "mesh",
172         mesh = "testnodes_pyramid.obj",
173         tiles = {"testnodes_mesh_stripes4.png^[multiply:#B0B0FF"},
174         paramtype = "light",
175         collision_box = tall_pyr_cbox,
176         waving = 3,
177
178         groups = {dig_immediate=3},
179 })