2020-02-20 05:57:13 +01:00
|
|
|
local S = ropes.S
|
2015-02-10 07:15:16 +01:00
|
|
|
|
2017-02-01 04:11:12 +01:00
|
|
|
if minetest.get_modpath("farming") then
|
2017-05-07 19:49:56 +02:00
|
|
|
-- 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'},
|
|
|
|
}
|
|
|
|
})
|
2017-02-01 04:11:12 +01:00
|
|
|
end
|
2015-02-10 07:15:16 +01:00
|
|
|
|
2017-09-30 18:17:32 +02:00
|
|
|
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
|
|
|
|
|
2017-04-02 23:49:04 +02:00
|
|
|
minetest.register_craft({
|
2017-05-07 19:49:56 +02:00
|
|
|
output = 'ropes:ropesegment',
|
2017-04-02 23:49:04 +02:00
|
|
|
recipe = {
|
|
|
|
{'group:thread','group:thread'},
|
|
|
|
{'group:thread','group:thread'},
|
|
|
|
{'group:thread','group:thread'},
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2017-02-01 03:53:16 +01:00
|
|
|
minetest.register_craftitem("ropes:ropesegment", {
|
2017-02-03 08:22:31 +01:00
|
|
|
description = S("Rope Segment"),
|
2017-02-01 03:53:16 +01:00
|
|
|
_doc_items_longdesc = ropes.doc.ropesegment_longdesc,
|
|
|
|
_doc_items_usagehelp = ropes.doc.ropesegment_usage,
|
2017-02-01 04:32:40 +01:00
|
|
|
groups = {vines = 1},
|
2017-02-01 03:53:16 +01:00
|
|
|
inventory_image = "ropes_item.png",
|
2015-02-10 07:15:16 +01:00
|
|
|
})
|
2017-02-01 03:53:16 +01:00
|
|
|
|
2017-02-04 18:58:53 +01:00
|
|
|
local cotton_burn_time = 1
|
2017-02-10 05:29:42 +01:00
|
|
|
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
|
2017-02-04 08:00:25 +01:00
|
|
|
local stick_burn_time = minetest.get_craft_result({method="fuel", width=1, items={ItemStack("default:stick")}}).time
|
2017-02-10 05:29:42 +01:00
|
|
|
ropes.ladder_burn_time = ropes.rope_burn_time * 2 + stick_burn_time * 3
|
2017-02-04 08:00:25 +01:00
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
type = "fuel",
|
|
|
|
recipe = "ropes:ropesegment",
|
2017-02-10 05:29:42 +01:00
|
|
|
burntime = ropes.rope_burn_time,
|
2017-02-04 08:00:25 +01:00
|
|
|
})
|