4 walls - from minetest_game
6 Copyright (C) 2015 Auke Kok <sofar@foo-projects.org>
8 This program is free software; you can redistribute it and/or modify it
9 under the terms of the GNU Lesser General Public License as published
10 by the Free Software Foundation; either version 2.1 of the License,
11 or (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty
15 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16 See the GNU Lesser General Public License for more details:
17 https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
23 walls
.register
= function(wall_name
, wall_desc
, wall_desc_middle
, wall_texture
, wall_sounds
, groups
, connect_groups
)
24 -- inventory node, and pole-type wall start item
26 connect_groups
[#connect_groups
+ 1] = "group:wall"
27 minetest
.register_node(wall_name
, {
28 description
= wall_desc
,
32 fixed
= {{-1/4, -1/2, -1/4, 1/4, 1/2, 1/4}},
34 connect_front
= {{-3/16, -1/2, -1/2, 3/16, 3/8, -1/4}},
35 connect_left
= {{-1/2, -1/2, -3/16, -1/4, 3/8, 3/16}},
36 connect_back
= {{-3/16, -1/2, 1/4, 3/16, 3/8, 1/2}},
37 connect_right
= {{ 1/4, -1/2, -3/16, 1/2, 3/8, 3/16}},
41 fixed
= {{-1/4, -1/2, -1/4, 1/4, 1, 1/4}},
43 connect_front
= {{-1/4, -1/2, -1/2, 1/4, 1, -1/4}},
44 connect_left
= {{-1/2, -1/2, -1/4, -1/4, 1, 1/4}},
45 connect_back
= {{-1/4, -1/2, 1/4, 1/4, 1, 1/2}},
46 connect_right
= {{ 1/4, -1/2, -1/4, 1/2, 1, 1/4}},
48 connects_to
= connect_groups
,
50 is_ground_content
= false,
51 tiles
= { wall_texture
, },
57 minetest
.register_node(wall_name
.. "_middle", {
58 description
= wall_desc_middle
,
62 fixed
= {{-1/2, -1/2, -3/16, 1/2, 3/8, 3/16}},
66 fixed
= {{-1/2, -1/2, -3/16, 1/2, 1, 3/16}},
68 connect_sides
= { "left", "right" },
70 paramtype2
= "facedir",
71 is_ground_content
= false,
72 tiles
= { wall_texture
, },