5 local fence_collision_extra = minetest.settings:get_bool("enable_fence_tall") and 3/8 or 0
7 -- Load support for MT game translation.
8 local S = minetest.get_translator("walls")
10 walls.register = function(wall_name, wall_desc, wall_texture_table, wall_mat, wall_sounds)
11 --make wall_texture_table paramenter backwards compatible for mods passing single texture
12 if type(wall_texture_table) ~= "table" then
13 wall_texture_table = { wall_texture_table }
15 -- inventory node, and pole-type wall start item
16 minetest.register_node(wall_name, {
17 description = wall_desc,
21 fixed = {-1/4, -1/2, -1/4, 1/4, 1/2, 1/4},
23 connect_front = {-3/16, -1/2, -1/2, 3/16, 3/8, -1/4},
24 connect_left = {-1/2, -1/2, -3/16, -1/4, 3/8, 3/16},
25 connect_back = {-3/16, -1/2, 1/4, 3/16, 3/8, 1/2},
26 connect_right = { 1/4, -1/2, -3/16, 1/2, 3/8, 3/16},
30 fixed = {-1/4, -1/2, -1/4, 1/4, 1/2 + fence_collision_extra, 1/4},
33 connect_front = {-1/4,-1/2,-1/2,1/4,1/2 + fence_collision_extra,-1/4},
34 connect_left = {-1/2,-1/2,-1/4,-1/4,1/2 + fence_collision_extra,1/4},
35 connect_back = {-1/4,-1/2,1/4,1/4,1/2 + fence_collision_extra,1/2},
36 connect_right = {1/4,-1/2,-1/4,1/2,1/2 + fence_collision_extra,1/4},
38 connects_to = { "group:wall", "group:stone", "group:fence" },
40 is_ground_content = false,
41 tiles = wall_texture_table,
43 groups = { cracky = 3, wall = 1, stone = 2 },
48 minetest.register_craft({
49 output = wall_name .. " 6",
52 { wall_mat, wall_mat, wall_mat},
53 { wall_mat, wall_mat, wall_mat},
59 walls.register("walls:cobble", S("Cobblestone Wall"), {"default_cobble.png"},
60 "default:cobble", default.node_sound_stone_defaults())
62 walls.register("walls:mossycobble", S("Mossy Cobblestone Wall"), {"default_mossycobble.png"},
63 "default:mossycobble", default.node_sound_stone_defaults())
65 walls.register("walls:desertcobble", S("Desert Cobblestone Wall"), {"default_desert_cobble.png"},
66 "default:desert_cobble", default.node_sound_stone_defaults())