Licenses: (Part 4) Remove overlooked WTFPL text. Cleanup
[oweals/minetest_game.git] / mods / walls / init.lua
1 walls = {}
2
3 walls.register = function(wall_name, wall_desc, wall_texture, wall_mat, wall_sounds)
4         -- inventory node, and pole-type wall start item
5         minetest.register_node(wall_name, {
6                 description = wall_desc,
7                 drawtype = "nodebox",
8                 node_box = {
9                         type = "connected",
10                         fixed = {{-1/4, -1/2, -1/4, 1/4, 1/2, 1/4}},
11                         -- connect_bottom =
12                         connect_front = {{-3/16, -1/2, -1/2,  3/16, 3/8, -1/4}},
13                         connect_left = {{-1/2, -1/2, -3/16, -1/4, 3/8,  3/16}},
14                         connect_back = {{-3/16, -1/2,  1/4,  3/16, 3/8,  1/2}},
15                         connect_right = {{ 1/4, -1/2, -3/16,  1/2, 3/8,  3/16}},
16                 },
17                 connects_to = { "group:wall", "group:stone" },
18                 paramtype = "light",
19                 is_ground_content = false,
20                 tiles = { wall_texture, },
21                 walkable = true,
22                 groups = { cracky = 3, wall = 1, stone = 2 },
23                 sounds = wall_sounds,
24         })
25
26         -- crafting recipe
27         minetest.register_craft({
28                 output = wall_name .. " 6",
29                 recipe = {
30                         { '', '', '' },
31                         { wall_mat, wall_mat, wall_mat},
32                         { wall_mat, wall_mat, wall_mat},
33                 }
34         })
35
36 end
37
38 walls.register("walls:cobble", "Cobblestone Wall", "default_cobble.png",
39                 "default:cobble", default.node_sound_stone_defaults())
40
41 walls.register("walls:mossycobble", "Mossy Cobblestone Wall", "default_mossycobble.png",
42                 "default:mossycobble", default.node_sound_stone_defaults())
43
44 walls.register("walls:desertcobble", "Desert Cobblestone Wall", "default_desert_cobble.png",
45                 "default:desert_cobble", default.node_sound_stone_defaults())
46