Prevented a collision with durapick and moreblocks
We both were defining something that took group:wood times 9 and returned something. Now if moreblocks is installed too we just use moreblocks:wood_tile (Same recipe so same resource)
This commit is contained in:
parent
b69ec3362a
commit
eb2f4192aa
56
wood.lua
56
wood.lua
@ -1,3 +1,6 @@
|
||||
local default = rawget(_G, "default") or {}
|
||||
local morebocks = rawget(_G, "moreblocks") or {}
|
||||
|
||||
-- Make such a thing
|
||||
minetest.register_tool("durapick:wood_pick", {
|
||||
description = "Durable Wooden Pickaxe",
|
||||
@ -15,17 +18,28 @@ minetest.register_tool("durapick:wood_pick", {
|
||||
groups = {pickaxe = 1}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shaped",
|
||||
output = "durapick:wood_pick 1",
|
||||
recipe = { -- Use globals to allow customized recipes
|
||||
{durapick_resource_wood_post, durapick_resource_wood_post, durapick_resource_wood_post},
|
||||
{"", durapick_stick, ""},
|
||||
{"", durapick_stick, ""}
|
||||
},
|
||||
})
|
||||
|
||||
default = rawget(_G, "default") or {}
|
||||
if moreblocks == nil then
|
||||
minetest.register_craft({
|
||||
type = "shaped",
|
||||
output = "durapick:wood_pick 1",
|
||||
recipe = { -- Use globals to allow customized recipes
|
||||
{durapick_resource_wood_post, durapick_resource_wood_post, durapick_resource_wood_post},
|
||||
{"", durapick_stick, ""},
|
||||
{"", durapick_stick, ""}
|
||||
},
|
||||
})
|
||||
else
|
||||
minetest.register_craft({
|
||||
type = "shaped",
|
||||
output = "durapick:wood_pick 1",
|
||||
recipe = { -- Use more blocks instead of our own dura_wood
|
||||
{"moreblocks:wood_tile", "moreblocks:wood_tile", "moreblocks:wood_tile"},
|
||||
{"", durapick_stick, ""},
|
||||
{"", durapick_stick, ""}
|
||||
},
|
||||
})
|
||||
|
||||
end
|
||||
minetest.register_node("durapick:dura_wood", {
|
||||
description = "Dura Wood",
|
||||
paramtype2 = "facedir",
|
||||
@ -38,12 +52,14 @@ minetest.register_node("durapick:dura_wood", {
|
||||
|
||||
ItemStack("durapick:dura_wood", 99)
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shaped",
|
||||
output = "durapick:dura_wood 1",
|
||||
recipe = { -- Use globals to allow customized recipes
|
||||
{durapick_resource_wood_pre, durapick_resource_wood_pre, durapick_resource_wood_pre},
|
||||
{durapick_resource_wood_pre, durapick_resource_wood_pre, durapick_resource_wood_pre},
|
||||
{durapick_resource_wood_pre, durapick_resource_wood_pre, durapick_resource_wood_pre}
|
||||
},
|
||||
})
|
||||
if moreblocks == nil then
|
||||
minetest.register_craft({
|
||||
type = "shaped",
|
||||
output = "durapick:dura_wood 1",
|
||||
recipe = { -- Use globals to allow customized recipes
|
||||
{durapick_resource_wood_pre, durapick_resource_wood_pre, durapick_resource_wood_pre},
|
||||
{durapick_resource_wood_pre, durapick_resource_wood_pre, durapick_resource_wood_pre},
|
||||
{durapick_resource_wood_pre, durapick_resource_wood_pre, durapick_resource_wood_pre}
|
||||
},
|
||||
})
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user