Fix `[sheet` usage in particle spawner.
[insidethebox.git] / mods / walls / init.lua
blobb761963bdf5abad01a14ceeea295636ece49e4a6
2 --[[
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
19 ]]--
21 walls = {}
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
25 groups.wall = 1
26 connect_groups[#connect_groups + 1] = "group:wall"
27 minetest.register_node(wall_name, {
28 description = wall_desc,
29 drawtype = "nodebox",
30 node_box = {
31 type = "connected",
32 fixed = {{-1/4, -1/2, -1/4, 1/4, 1/2, 1/4}},
33 -- connect_bottom =
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}},
39 collision_box = {
40 type = "connected",
41 fixed = {{-1/4, -1/2, -1/4, 1/4, 1, 1/4}},
42 -- connect_bottom =
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,
49 paramtype = "light",
50 is_ground_content = false,
51 tiles = { wall_texture, },
52 walkable = true,
53 groups = groups,
54 sounds = wall_sounds,
57 minetest.register_node(wall_name .. "_middle", {
58 description = wall_desc_middle,
59 drawtype = "nodebox",
60 node_box = {
61 type = "fixed",
62 fixed = {{-1/2, -1/2, -3/16, 1/2, 3/8, 3/16}},
64 collision_box = {
65 type = "fixed",
66 fixed = {{-1/2, -1/2, -3/16, 1/2, 1, 3/16}},
68 connect_sides = { "left", "right" },
69 paramtype = "light",
70 paramtype2 = "facedir",
71 is_ground_content = false,
72 tiles = { wall_texture, },
73 walkable = true,
74 groups = groups,
75 sounds = wall_sounds,
78 end