forked from stujones11/clothing
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcrafting.lua
103 lines (92 loc) · 2.35 KB
/
crafting.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
minetest.register_craft({
output = 'clothing:yarn_spool_empty',
recipe = {
{'group:stick'},
{'stairs:slab_wood'},
},
})
minetest.register_craft({
output = 'clothing:bone_needle',
recipe = {
{'group:bone'},
{'group:bone'},
},
})
minetest.register_craft({
output = 'clothing:spinning_machine',
recipe = {
{'group:wood', 'group:wood', 'group:wood'},
{'group:wood', 'farming:string', 'group:wood'},
{'group:wood', "group:wood", 'group:wood'},
},
})
minetest.register_craft({
output = 'clothing:loom',
recipe = {
{'group:stick', 'default:pinewood', 'group:stick'},
{'group:stick', 'default:pinewood', 'group:stick'},
{'default:pinewood', "default:pinewood", 'default:pinewood'},
},
})
minetest.register_craft({
output = 'clothing:dye_machine_empty',
recipe = {
{'group:wood', 'group:stick', 'group:wood'},
{'group:wood', 'group:stick', 'group:wood'},
{'group:wood', "group:wood", 'group:wood'},
},
})
minetest.register_craft({
output = 'clothing:sewing_table',
recipe = {
{'group:wood', 'group:wood', 'group:wood'},
{'group:stick', 'clothing:bone_needle', 'group:stick'},
{'group:stick', 'clothing:bone_needle', 'group:stick'},
},
})
if clothing.have_farming then
minetest.clear_craft({
--output = "farming:string 2"
recipe = {
{"farming:cotton"},
{"farming:cotton"},
},
})
minetest.register_craft({
output = "farming:string",
recipe = {
{"clothing:yarn_spool_white"},
{"clothing:yarn_spool_white"},
},
replacements = {
{"clothing:yarn_spool_white", "clothing:yarn_spool_empty"},
{"clothing:yarn_spool_white", "clothing:yarn_spool_empty"},
},
})
end
if minetest.registered_items["farming:hemp_fibre"] then
minetest.clear_craft({
--output = "farming:cotton 3"
recipe = {
{"farming:hemp_fibre"},
{"farming:hemp_fibre"},
{"farming:hemp_fibre"},
},
})
end
for color, data in pairs(clothing.colors) do
minetest.register_craft({
type = "shapeless",
output = "clothing:gloves_"..color,
recipe = {"clothing:glove_right_"..color,
"clothing:glove_left_"..color},
})
minetest.register_craft({
type = "shapeless",
output = "clothing:glove_right_"..color,
recipe = {"clothing:gloves_"..color},
replacements = {
{"clothing:gloves_"..color, "clothing:glove_left_"..color},
},
})
end