1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
-- Pipes mod by VanessaE
-- 2012-06-12
--
-- Entirely my own code. This mod merely supplies enough nodes to build
-- a bunch of pipes in all directions and with all types of junctions.
--
-- License: WTFPL
--
local DEBUG = 1
-- Local Functions
local dbg = function(s)
if DEBUG == 1 then
print('[PIPES] ' .. s)
end
end
-- Nodes
minetest.register_node("pipes:vertical", {
description = "Pipe (vertical)",
drawtype = "nodebox",
tile_images = {"pipes_pipe_side_empty.png"},
paramtype = "light",
-- paramtype2 = "facedir",
selection_box = {
type = "fixed",
fixed = { -0.15, -0.5, -0.15, 0.15, 0.5, 0.15 },
},
node_box = {
type = "fixed",
fixed = {
{ -0.15, -0.5 , -0.15, 0.15, -0.45, 0.15 },
{ -0.1 , -0.45, -0.1 , 0.1 , 0.45, 0.1 },
{ -0.15, 0.45, -0.15, 0.15, 0.5 , 0.15 },
}
},
groups = {snappy=3},
sounds = default.node_sound_wood_defaults(),
walkable = true,
})
minetest.register_node("pipes:horizontal", {
description = "Pipe (horizontal)",
drawtype = "nodebox",
tile_images = {"pipes_pipe_side_empty.png"},
paramtype = "light",
paramtype2 = "facedir",
selection_box = {
type = "fixed",
fixed = { -0.5, -0.15, -0.15, 0.5, 0.15, 0.15 },
},
node_box = {
type = "fixed",
fixed = {
{ -0.5 , -0.15, -0.15, -0.45, 0.15, 0.15 },
{ -0.45, -0.1 , -0.1 , 0.45, 0.1 , 0.1 },
{ 0.45, -0.15, -0.15, 0.5 , 0.15, 0.15 },
}
},
groups = {snappy=3},
sounds = default.node_sound_wood_defaults(),
walkable = true,
})
print("[Pipes] Loaded!")
|