-
Notifications
You must be signed in to change notification settings - Fork 3
/
blocks.lua
144 lines (141 loc) · 4.2 KB
/
blocks.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
local asphalt_shingles = { --desc, color, dye
{"Grey", "grey", "grey"},
{"Dark Grey", "dark_grey", "dark_grey"},
{"Red", "red", "red"},
{"Green", "green", "green"},
}
for i in ipairs (asphalt_shingles) do
local desc = asphalt_shingles[i][1]
local color = asphalt_shingles[i][2]
local dyes = asphalt_shingles[i][3]
-- Asphalt Bundle
minetest.register_node("myroofs:asphalt_shingle_"..color.."_bundle", {
description = desc.." Asphalt Shingle bundle",
drawtype = "normal",
tiles = {"myroofs_asphalt_shingle_"..color..".png"},
paramtype = "light",
paramtype2 = "facedir",
groups = {choppy=2, oddly_breakable_by_hand=2},
sounds = default.node_sound_wood_defaults(),
-- on_place = minetest.rotate_node,
})
--Craft
minetest.register_craft({
output = "myroofs:asphalt_shingle_"..color.."_bundle 4",
recipe = {
{"default:gravel", "default:coal_lump","default:gravel"},
{"default:coal_lump", "default:coal_lump","default:coal_lump"},
{"default:gravel", "default:gravel","dye:"..dyes},
}
})
end
--Grey Round Asphalt
minetest.register_node("myroofs:asphalt_shingle_grey_round_bundle", {
description = "Grey Round Asphalt Shingle bundle",
drawtype = "normal",
tiles = {"myroofs_asphalt_shingle_grey_round.png"},
paramtype = "light",
paramtype2 = "facedir",
groups = {choppy=2, oddly_breakable_by_hand=2},
sounds = default.node_sound_wood_defaults(),
-- on_place = minetest.rotate_node,
})
--Craft
minetest.register_craft({
output = "myroofs:asphalt_shingle_grey_round_bundle 4",
recipe = {
{"", "myroofs:asphalt_shingle_grey_bundle",""},
{"myroofs:asphalt_shingle_grey_bundle", "","myroofs:asphalt_shingle_grey_bundle"},
{"", "myroofs:asphalt_shingle_grey_bundle",""},
}
})
--Dark Grey Round Asphalt
minetest.register_node("myroofs:asphalt_shingle_dark_grey_round_bundle", {
description = "Dark Grey Round Asphalt Shingle bundle",
drawtype = "normal",
tiles = {"myroofs_asphalt_shingle_dark_grey_round.png"},
paramtype = "light",
paramtype2 = "facedir",
groups = {choppy=2, oddly_breakable_by_hand=2},
sounds = default.node_sound_wood_defaults(),
})
minetest.register_craft({
output = "myroofs:asphalt_shingle_dark_grey_round_bundle 4",
recipe = {
{"", "myroofs:asphalt_shingle_dark_grey_bundle",""},
{"myroofs:asphalt_shingle_dark_grey_bundle", "","myroofs:asphalt_shingle_dark_grey_bundle"},
{"", "myroofs:asphalt_shingle_dark_grey_bundle",""},
}
})
--Dark straw
minetest.register_node("myroofs:straw_dark", {
description = "Dark Straw",
drawtype = "normal",
tiles = {"myroofs_straw_dark.png"},
paramtype = "light",
paramtype2 = "facedir",
groups = {choppy=2, oddly_breakable_by_hand=2},
sounds = default.node_sound_wood_defaults(),
})
--Craft
minetest.register_craft({
output = "myroofs:straw_dark 1",
recipe = {
{"farming:straw", "dye:black",""},
{"", "",""},
{"", "",""},
}
})
--Reet
minetest.register_node("myroofs:reet", {
description = "Reet",
drawtype = "normal",
tiles = {"myroofs_reet.png"},
paramtype = "light",
paramtype2 = "facedir",
groups = {choppy=2, oddly_breakable_by_hand=2},
sounds = default.node_sound_wood_defaults(),
})
--Craft
minetest.register_craft({
output = "myroofs:reet 1",
recipe = {
{"farming:straw", "dye:brown",""},
{"", "",""},
{"", "",""},
}
})
minetest.register_node("myroofs:copper_roofing", {
description = "Copper Roofing",
drawtype = "normal",
tiles = {"myroofs_copper.png"},
paramtype = "light",
paramtype2 = "facedir",
groups = {choppy=2, oddly_breakable_by_hand=2},
sounds = default.node_sound_wood_defaults(),
})
minetest.register_node("myroofs:green_copper_roofing", {
description = "Green Copper Roofing",
drawtype = "normal",
tiles = {"myroofs_green_copper.png"},
paramtype = "light",
paramtype2 = "facedir",
groups = {choppy=2, oddly_breakable_by_hand=2},
sounds = default.node_sound_wood_defaults(),
})
minetest.register_craft({
output = "myroofs:copper_roofing",
recipe = {
{"default:copper_ingot", "",""},
{"default:copper_ingot", "",""},
{"default:copper_ingot", "",""},
}
})
minetest.register_craft({
output = "myroofs:green_copper_roofing",
recipe = {
{"default:copper_ingot", "dye:green",""},
{"default:copper_ingot", "",""},
{"default:copper_ingot", "",""},
}
})