summaryrefslogtreecommitdiff
path: root/init.lua
blob: dba95a55decc9314216a97f9f9243b2a1868a559 (plain)
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
--Register Nodes, assign textures, blah, blah...
minetest.register_node("plasticbox:plasticbox", {
	description = "Plain Plastic Box",
	tiles = {"plasticbox.png"},
	is_ground_content = true,
	groups = {choppy=1, snappy=1, oddly_breakable_by_hand=1, level=1},
	sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("plasticbox:plasticbox_black", {
	description = "Black Plastic Box",
	tiles = {"plasticbox_black.png"},
	is_ground_content = true,
	groups = {choppy=1, snappy=1, oddly_breakable_by_hand=1, level=1},
	sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("plasticbox:plasticbox_blue", {
	description = "Blue Plastic Box",
	tiles = {"plasticbox_blue.png"},
	is_ground_content = true,
	groups = {choppy=1, snappy=1, oddly_breakable_by_hand=1, level=1},
	sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("plasticbox:plasticbox_brown", {
	description = "Brown Plastic Box",
	tiles = {"plasticbox_brown.png"},
	is_ground_content = true,
	groups = {choppy=1, snappy=1, oddly_breakable_by_hand=1, level=1},
	sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("plasticbox:plasticbox_cyan", {
	description = "Cyan Plastic Box",
	tiles = {"plasticbox_cyan.png"},
	is_ground_content = true,
	groups = {choppy=1, snappy=1, oddly_breakable_by_hand=1, level=1},
	sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("plasticbox:plasticbox_darkgreen", {
	description = "Dark Green Plastic Box",
	tiles = {"plasticbox_darkgreen.png"},
	is_ground_content = true,
	groups = {choppy=1, snappy=1, oddly_breakable_by_hand=1, level=1},
	sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("plasticbox:plasticbox_darkgrey", {
	description = "Dark Gray Plastic Box",
	tiles = {"plasticbox_darkgrey.png"},
	is_ground_content = true,
	groups = {choppy=1, snappy=1, oddly_breakable_by_hand=1, level=1},
	sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("plasticbox:plasticbox_green", {
	description = "Green Plastic Box",
	tiles = {"plasticbox_green.png"},
	is_ground_content = true,
	groups = {choppy=1, snappy=1, oddly_breakable_by_hand=1, level=1},
	sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("plasticbox:plasticbox_grey", {
	description = "Gray Plastic Box",
	tiles = {"plasticbox_grey.png"},
	is_ground_content = true,
	groups = {choppy=1, snappy=1, oddly_breakable_by_hand=1, level=1},
	sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("plasticbox:plasticbox_magenta", {
	description = "Magenta Plastic Box",
	tiles = {"plasticbox_magenta.png"},
	is_ground_content = true,
	groups = {choppy=1, snappy=1, oddly_breakable_by_hand=1, level=1},
	sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("plasticbox:plasticbox_orange", {
	description = "Orange Plastic Box",
	tiles = {"plasticbox_orange.png"},
	is_ground_content = true,
	groups = {choppy=1, snappy=1, oddly_breakable_by_hand=1, level=1},
	sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("plasticbox:plasticbox_pink", {
	description = "Pink Plastic Box",
	tiles = {"plasticbox_pink.png"},
	is_ground_content = true,
	groups = {choppy=1, snappy=1, oddly_breakable_by_hand=1, level=1},
	sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("plasticbox:plasticbox_red", {
	description = "Red Plastic Box",
	tiles = {"plasticbox_red.png"},
	is_ground_content = true,
	groups = {choppy=1, snappy=1, oddly_breakable_by_hand=1, level=1},
	sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("plasticbox:plasticbox_violet", {
	description = "Violet Plastic Box",
	tiles = {"plasticbox_violet.png"},
	is_ground_content = true,
	groups = {choppy=1, snappy=1, oddly_breakable_by_hand=1, level=1},
	sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("plasticbox:plasticbox_white", {
	description = "White Plastic Box",
	tiles = {"plasticbox_white.png"},
	is_ground_content = true,
	groups = {choppy=1, snappy=1, oddly_breakable_by_hand=1, level=1},
	sounds = default.node_sound_stone_defaults(),
})
minetest.register_node("plasticbox:plasticbox_yellow", {
	description = "Yellow Plastic Box",
	tiles = {"plasticbox_yellow.png"},
	is_ground_content = true,
	groups = {choppy=1, snappy=1, oddly_breakable_by_hand=1, level=1},
	sounds = default.node_sound_stone_defaults(),
})


--Register craft for plain box
minetest.register_craft( {
        output = "plasticbox:plasticbox 4",
        recipe = {
                { "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" },
                { "homedecor:plastic_sheeting", "", "homedecor:plastic_sheeting" },
                { "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" }
        },
})

--Register crafts for colored boxes
minetest.register_craft({
     type = "shapeless",
     output = 'plasticbox:plasticbox_black',
     recipe = {'plasticbox:plasticbox', 'group:basecolor_black'},
})
minetest.register_craft({
     type = "shapeless",
     output = 'plasticbox:plasticbox_blue',
     recipe = {'plasticbox:plasticbox', 'group:basecolor_blue'},
})
minetest.register_craft({
     type = "shapeless",
     output = 'plasticbox:plasticbox_brown',
     recipe = {'plasticbox:plasticbox', 'group:basecolor_brown'},
})
minetest.register_craft({
     type = "shapeless",
     output = 'plasticbox:plasticbox_cyan',
     recipe = {'plasticbox:plasticbox', 'group:basecolor_cyan'},
})
minetest.register_craft({
     type = "shapeless",
     output = 'plasticbox:plasticbox_green',
     recipe = {'plasticbox:plasticbox', 'group:basecolor_green'},
})
minetest.register_craft({
     type = "shapeless",
     output = 'plasticbox:plasticbox_grey',
     recipe = {'plasticbox:plasticbox', 'group:basecolor_grey'},
})
minetest.register_craft({
     type = "shapeless",
     output = 'plasticbox:plasticbox_magenta',
     recipe = {'plasticbox:plasticbox', 'group:basecolor_magenta'},
})
minetest.register_craft({
     type = "shapeless",
     output = 'plasticbox:plasticbox_orange',
     recipe = {'plasticbox:plasticbox', 'group:basecolor_orange'},
})
minetest.register_craft({
     type = "shapeless",
     output = 'plasticbox:plasticbox_pink',
     recipe = {'plasticbox:plasticbox', 'group:basecolor_pink'},
})
minetest.register_craft({
     type = "shapeless",
     output = 'plasticbox:plasticbox_red',
     recipe = {'plasticbox:plasticbox', 'group:basecolor_red'},
})
minetest.register_craft({
     type = "shapeless",
     output = 'plasticbox:plasticbox_violet',
     recipe = {'plasticbox:plasticbox', 'group:basecolor_violet'},
})
minetest.register_craft({
     type = "shapeless",
     output = 'plasticbox:plasticbox_white',
     recipe = {'plasticbox:plasticbox', 'group:basecolor_white'},
})
minetest.register_craft({
     type = "shapeless",
     output = 'plasticbox:plasticbox_yellow',
     recipe = {'plasticbox:plasticbox', 'group:basecolor_yellow'},
})