]> git.lizzy.rs Git - Crafter.git/blob - mods/main/craft_recipes.lua
Fix indentation of all files
[Crafter.git] / mods / main / craft_recipes.lua
1 --crafting recipes
2
3 --cooking
4 minetest.register_craft({
5       type = "cooking",
6       output = "main:diamond",
7       recipe = "main:diamondore",
8       cooktime = 12,
9 })
10 minetest.register_craft({
11       type = "cooking",
12       output = "main:coal 4",
13       recipe = "main:coalore",
14       cooktime = 3,
15 })
16 minetest.register_craft({
17       type = "cooking",
18       output = "main:charcoal",
19       recipe = "main:tree",
20       cooktime = 2,
21 })
22 minetest.register_craft({
23       type = "cooking",
24       output = "main:gold",
25       recipe = "main:goldore",
26       cooktime = 9,
27 })
28 minetest.register_craft({
29       type = "cooking",
30       output = "main:iron",
31       recipe = "main:ironore",
32       cooktime = 6,
33 })
34 minetest.register_craft({
35       type = "cooking",
36       output = "main:stone",
37       recipe = "main:cobble",
38       cooktime = 3,
39 })
40
41 --fuel fuel fuel
42 minetest.register_craft({
43       type = "fuel",
44       recipe = "main:stick",
45       burntime = 1,
46 })
47 minetest.register_craft({
48       type = "fuel",
49       recipe = "main:tree",
50       burntime = 24,
51 })
52 minetest.register_craft({
53       type = "fuel",
54       recipe = "main:wood",
55       burntime = 12,
56 })
57 minetest.register_craft({
58       type = "fuel",
59       recipe = "main:leaves",
60       burntime = 3,
61 })
62 minetest.register_craft({
63       type = "fuel",
64       recipe = "main:coal",
65       burntime = 20,
66 })
67 ---crafting
68 minetest.register_craft({
69       type = "shapeless",
70       output = "main:wood 4",
71       recipe = {"main:tree"},
72 })
73
74 minetest.register_craft({
75       output = "main:stick 4",
76       recipe = {
77             {"main:wood"},
78             {"main:wood"}
79       }
80 })
81
82 local tool =     {"wood","stone", "iron","gold","diamond"}--the tool name
83 local material = {"wood","cobble","iron","gold","diamond"}--material to craft
84
85 for id,tool in pairs(tool) do
86       minetest.register_craft({
87             output = "main:"..tool.."pick",
88             recipe = {
89                   {"main:"..material[id], "main:"..material[id], "main:"..material[id]},
90                   {"", "main:stick", ""},
91                   {"", "main:stick", ""}
92             }
93       })
94       
95       minetest.register_craft({
96             output = "main:"..tool.."shovel",
97             recipe = {
98                   {"","main:"..material[id], ""},
99                   {"", "main:stick", ""},
100                   {"", "main:stick", ""}
101             }
102       })
103       
104       minetest.register_craft({
105             output = "main:"..tool.."axe",
106             recipe = {
107                   {"main:"..material[id], "main:"..material[id], ""},
108                   {"main:"..material[id], "main:stick", ""},
109                   {"", "main:stick", ""}
110             }
111       })
112       minetest.register_craft({
113             output = "main:"..tool.."axe",
114             recipe = {
115                   {"", "main:"..material[id], "main:"..material[id]},
116                   {"", "main:stick", "main:"..material[id]},
117                   {"", "main:stick", ""}
118             }
119       })
120       
121       minetest.register_craft({
122             output = "main:"..tool.."sword",
123             recipe = {
124                   {"","main:"..material[id], ""},
125                   {"","main:"..material[id], ""},
126                   {"", "main:stick", ""}
127             }
128       })
129 end
130
131 minetest.register_craft({
132       output = "main:ladder",
133       recipe = {
134             {"main:stick","", "main:stick"},
135             {"main:stick","main:stick", "main:stick"},
136             {"main:stick", "", "main:stick"}
137       }
138 })