generalize the rope-crafting recipe
This commit is contained in:
parent
a726abf1a9
commit
2729d8ff6d
20
crafts.lua
20
crafts.lua
@ -3,15 +3,23 @@ local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
local S, NS = dofile(MP.."/intllib.lua")
|
||||
|
||||
if minetest.get_modpath("farming") then
|
||||
minetest.register_craft({
|
||||
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
|
||||
end
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'ropes:ropesegment',
|
||||
recipe = {
|
||||
{'farming:cotton','farming:cotton'},
|
||||
{'farming:cotton','farming:cotton'},
|
||||
{'farming:cotton','farming:cotton'}
|
||||
{'group:thread','group:thread'},
|
||||
{'group:thread','group:thread'},
|
||||
{'group:thread','group:thread'},
|
||||
}
|
||||
})
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_craftitem("ropes:ropesegment", {
|
||||
description = S("Rope Segment"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user