-
Notifications
You must be signed in to change notification settings - Fork 8
/
crafts.lua
90 lines (81 loc) · 2.24 KB
/
crafts.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
local S = ropes.S
if minetest.get_modpath("farming") then
-- this doesn't work reliably due to side effects of https://github.com/minetest/minetest/issues/5518
-- local old_def = minetest.registered_craftitems["farming:cotton"]
-- if old_def then
-- old_def.groups["thread"] = 1
-- minetest.override_item("farming:cotton", {
-- groups = old_def.groups
-- })
-- end
minetest.register_craft({
output = 'ropes:ropesegment',
recipe = {
{'farming:cotton','farming:cotton'},
{'farming:cotton','farming:cotton'},
{'farming:cotton','farming:cotton'},
}
})
if farming.mod == "redo" or farming.mod == "undo" then
minetest.register_craft({
output = 'ropes:ropesegment',
recipe = {
{'farming:hemp_rope'},
{'farming:hemp_rope'},
}
})
end
end
if minetest.get_modpath("hemp") then
minetest.register_craft({
output = 'ropes:ropesegment',
recipe = {
{'hemp:hemp_rope'},
{'hemp:hemp_rope'},
}
})
end
if minetest.get_modpath("cottages") then
minetest.register_craft({
output = 'ropes:ropesegment',
recipe = {
{'cottages:rope'},
{'cottages:rope'},
}
})
end
if minetest.get_modpath("moreblocks") then
minetest.register_craft({
output = 'ropes:ropesegment',
recipe = {
{'moreblocks:rope','moreblocks:rope'},
{'moreblocks:rope','moreblocks:rope'},
{'moreblocks:rope','moreblocks:rope'},
}
})
end
minetest.register_craft({
output = 'ropes:ropesegment',
recipe = {
{'group:thread','group:thread'},
{'group:thread','group:thread'},
{'group:thread','group:thread'},
}
})
minetest.register_craftitem("ropes:ropesegment", {
description = S("Rope Segment"),
_doc_items_longdesc = ropes.doc.ropesegment_longdesc,
_doc_items_usagehelp = ropes.doc.ropesegment_usage,
groups = {vines = 1},
inventory_image = "ropes_item.png",
})
local cotton_burn_time = 1
ropes.wood_burn_time = minetest.get_craft_result({method="fuel", width=1, items={ItemStack("default:wood")}}).time
ropes.rope_burn_time = cotton_burn_time * 6
local stick_burn_time = minetest.get_craft_result({method="fuel", width=1, items={ItemStack("default:stick")}}).time
ropes.ladder_burn_time = ropes.rope_burn_time * 2 + stick_burn_time * 3
minetest.register_craft({
type = "fuel",
recipe = "ropes:ropesegment",
burntime = ropes.rope_burn_time,
})