]> git.lizzy.rs Git - dragonfireclient.git/blob - games/devtest/mods/unittests/crafting_prepare.lua
Merge pull request #59 from PrairieAstronomer/readme_irrlicht_change
[dragonfireclient.git] / games / devtest / mods / unittests / crafting_prepare.lua
1 -- Registering some dummy items and recipes for the crafting tests
2
3 minetest.register_craftitem("unittests:torch", {
4         description = "Crafting Test Item: Torch",
5         inventory_image = "unittests_torch.png",
6
7         groups = { dummy = 1 },
8 })
9 minetest.register_craftitem("unittests:coal_lump", {
10         description = "Crafting Test Item: Coal Lump",
11         inventory_image = "unittests_coal_lump.png",
12
13         groups = { dummy = 1 },
14 })
15 minetest.register_craftitem("unittests:stick", {
16         description = "Crafting Test Item: Stick",
17         inventory_image = "unittests_stick.png",
18
19         groups = { dummy = 1 },
20 })
21 minetest.register_craftitem("unittests:iron_lump", {
22         description = "Crafting Test Item: Iron Lump",
23         inventory_image = "unittests_iron_lump.png",
24
25         groups = { dummy = 1 },
26 })
27 minetest.register_craftitem("unittests:steel_ingot", {
28         description = "Crafting Test Item: Steel Ingot",
29         inventory_image = "unittests_steel_ingot.png",
30
31         groups = { dummy = 1 },
32 })
33
34 -- Use aliases in recipes for more complete testing
35
36 minetest.register_alias("unittests:steel_ingot_alias", "unittests:steel_ingot")
37 minetest.register_alias("unittests:coal_lump_alias", "unittests:coal_lump")
38 minetest.register_alias("unittests:iron_lump_alias", "unittests:iron_lump")
39
40 -- Recipes for tests: Normal crafting, cooking and fuel
41
42 minetest.register_craft({
43         output = 'unittests:torch 4',
44         recipe = {
45                 {'unittests:coal_lump_alias'},
46                 {'unittests:stick'},
47         }
48 })
49
50 minetest.register_craft({
51         type = "cooking",
52         output = "unittests:steel_ingot_alias",
53         recipe = "unittests:iron_lump_alias",
54 })
55
56 minetest.register_craft({
57         type = "fuel",
58         recipe = "unittests:coal_lump_alias",
59         burntime = 40,
60 })
61
62 -- Test tool repair
63 minetest.register_craft({
64         type = "toolrepair",
65         additional_wear = -0.05,
66 })
67
68 -- Test the disable_repair=1 group
69 minetest.register_tool("unittests:unrepairable_tool", {
70         description = "Crafting Test Item: Unrepairable Tool",
71         inventory_image = "unittests_unrepairable_tool.png",
72         tool_capabilities = {
73                 groupcaps = {
74                         cracky = {
75                                 times = {3, 2, 1},
76                         }
77                 }
78         },
79         groups = { disable_repair = 1, dummy = 1 }
80 })
81
82 minetest.register_tool("unittests:repairable_tool", {
83         description = "Crafting Test Item: Repairable Tool",
84         inventory_image = "unittests_repairable_tool.png",
85         tool_capabilities = {
86                 groupcaps = {
87                         cracky = {
88                                 times = {3, 2, 1},
89                         }
90                 }
91         },
92
93         groups = { dummy = 1 },
94 })