-
Notifications
You must be signed in to change notification settings - Fork 20
/
nodes_fences.lua
159 lines (134 loc) · 3.95 KB
/
nodes_fences.lua
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
-- 22.01.13 Changed texture to that of the wood from the minimal development game
local S = cottages.S
minetest.register_node("cottages:fence_small", {
description = S("small fence"),
drawtype = "nodebox",
-- top, bottom, side1, side2, inner, outer
tiles = {"cottages_minimal_wood.png"},
paramtype = "light",
paramtype2 = "facedir",
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
node_box = {
type = "fixed",
fixed = {
{ -0.45, -0.35, 0.46, 0.45, -0.20, 0.50},
{ -0.45, 0.00, 0.46, 0.45, 0.15, 0.50},
{ -0.45, 0.35, 0.46, 0.45, 0.50, 0.50},
{ -0.50, -0.50, 0.46, -0.45, 0.50, 0.50},
{ 0.45, -0.50, 0.46, 0.50, 0.50, 0.50},
},
},
selection_box = {
type = "fixed",
fixed = {
{ -0.50, -0.50, 0.4, 0.50, 0.50, 0.5},
},
},
is_ground_content = false,
})
minetest.register_node("cottages:fence_corner", {
description = S("small fence corner"),
drawtype = "nodebox",
-- top, bottom, side1, side2, inner, outer
tiles = {"cottages_minimal_wood.png"},
paramtype = "light",
paramtype2 = "facedir",
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
node_box = {
type = "fixed",
fixed = {
{ -0.45, -0.35, 0.46, 0.45, -0.20, 0.50},
{ -0.45, 0.00, 0.46, 0.45, 0.15, 0.50},
{ -0.45, 0.35, 0.46, 0.45, 0.50, 0.50},
{ -0.50, -0.50, 0.46, -0.45, 0.50, 0.50},
{ 0.45, -0.50, 0.46, 0.50, 0.50, 0.50},
{ 0.46, -0.35, -0.45, 0.50, -0.20, 0.45},
{ 0.46, 0.00, -0.45, 0.50, 0.15, 0.45},
{ 0.46, 0.35, -0.45, 0.50, 0.50, 0.45},
{ 0.46, -0.50, -0.50, 0.50, 0.50, -0.45},
{ 0.46, -0.50, 0.45, 0.50, 0.50, 0.50},
},
},
selection_box = {
type = "fixed",
fixed = {
{ -0.50, -0.50,-0.5, 0.50, 0.50, 0.5},
},
},
is_ground_content = false,
})
minetest.register_node("cottages:fence_end", {
description = S("small fence end"),
drawtype = "nodebox",
-- top, bottom, side1, side2, inner, outer
tiles = {"cottages_minimal_wood.png"},
paramtype = "light",
paramtype2 = "facedir",
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
node_box = {
type = "fixed",
fixed = {
{ -0.45, -0.35, 0.46, 0.45, -0.20, 0.50},
{ -0.45, 0.00, 0.46, 0.45, 0.15, 0.50},
{ -0.45, 0.35, 0.46, 0.45, 0.50, 0.50},
{ -0.50, -0.50, 0.46, -0.45, 0.50, 0.50},
{ 0.45, -0.50, 0.46, 0.50, 0.50, 0.50},
{ 0.46, -0.35, -0.45, 0.50, -0.20, 0.45},
{ 0.46, 0.00, -0.45, 0.50, 0.15, 0.45},
{ 0.46, 0.35, -0.45, 0.50, 0.50, 0.45},
{ 0.46, -0.50, -0.50, 0.50, 0.50, -0.45},
{ 0.46, -0.50, 0.45, 0.50, 0.50, 0.50},
{ -0.50, -0.35, -0.45, -0.46, -0.20, 0.45},
{ -0.50, 0.00, -0.45, -0.46, 0.15, 0.45},
{ -0.50, 0.35, -0.45, -0.46, 0.50, 0.45},
{ -0.50, -0.50, -0.50, -0.46, 0.50, -0.45},
{ -0.50, -0.50, 0.45, -0.46, 0.50, 0.50},
},
},
selection_box = {
type = "fixed",
fixed = {
{ -0.50, -0.50,-0.5, 0.50, 0.50, 0.5},
},
},
is_ground_content = false,
})
minetest.register_craft({
output = "cottages:fence_small 3",
recipe = {
{cottages.craftitem_fence, cottages.craftitem_fence},
}
})
-- xfences can be configured to replace normal fences - which makes them uncraftable
if ( minetest.get_modpath("xfences") ~= nil ) then
minetest.register_craft({
output = "cottages:fence_small 3",
recipe = {
{"xfences:fence","xfences:fence" },
}
})
end
minetest.register_craft({
output = "cottages:fence_corner",
recipe = {
{"cottages:fence_small","cottages:fence_small" },
}
})
minetest.register_craft({
output = "cottages:fence_small 2",
recipe = {
{"cottages:fence_corner" },
}
})
minetest.register_craft({
output = "cottages:fence_end",
recipe = {
{"cottages:fence_small","cottages:fence_small", "cottages:fence_small" },
}
})
minetest.register_craft({
output = "cottages:fence_small 3",
recipe = {
{"cottages:fence_end" },
}
})