mirror of
https://github.com/minetest-mods/ropes.git
synced 2024-12-29 17:17:30 +01:00
generalize the rope-crafting recipe
This commit is contained in:
parent
a726abf1a9
commit
2729d8ff6d
24
crafts.lua
24
crafts.lua
@ -3,16 +3,24 @@ local MP = minetest.get_modpath(minetest.get_current_modname())
|
|||||||
local S, NS = dofile(MP.."/intllib.lua")
|
local S, NS = dofile(MP.."/intllib.lua")
|
||||||
|
|
||||||
if minetest.get_modpath("farming") then
|
if minetest.get_modpath("farming") then
|
||||||
minetest.register_craft({
|
local old_def = minetest.registered_craftitems["farming:cotton"]
|
||||||
output = 'ropes:ropesegment',
|
if old_def then
|
||||||
recipe = {
|
old_def.groups["thread"] = 1
|
||||||
{'farming:cotton','farming:cotton'},
|
minetest.override_item("farming:cotton", {
|
||||||
{'farming:cotton','farming:cotton'},
|
groups = old_def.groups
|
||||||
{'farming:cotton','farming:cotton'}
|
})
|
||||||
}
|
end
|
||||||
})
|
|
||||||
end
|
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", {
|
minetest.register_craftitem("ropes:ropesegment", {
|
||||||
description = S("Rope Segment"),
|
description = S("Rope Segment"),
|
||||||
_doc_items_longdesc = ropes.doc.ropesegment_longdesc,
|
_doc_items_longdesc = ropes.doc.ropesegment_longdesc,
|
||||||
|
Loading…
Reference in New Issue
Block a user