Update depends (#11)
I added `wool` in depends and `cottages` in optional_depends. Craft using `cottages`’s items are now registered only when `cottages` is loaded.
This commit is contained in:
parent
d67d7a34c8
commit
349b508d8a
38
init.lua
38
init.lua
@ -13,6 +13,8 @@ else
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- cottages support
|
||||||
|
local use_cottages = minetest.get_modpath("cottages")
|
||||||
|
|
||||||
local tapestry = {}
|
local tapestry = {}
|
||||||
|
|
||||||
@ -142,35 +144,37 @@ minetest.register_craft({
|
|||||||
recipe = {'wool:white', 'default:stick'},
|
recipe = {'wool:white', 'default:stick'},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "shapeless",
|
|
||||||
output = 'castle_tapestries:tapestry',
|
|
||||||
recipe = {'cottages:wool', 'default:stick'},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
output = 'castle_tapestries:tapestry_long',
|
output = 'castle_tapestries:tapestry_long',
|
||||||
recipe = {'wool:white', 'castle_tapestries:tapestry'},
|
recipe = {'wool:white', 'castle_tapestries:tapestry'},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
type = "shapeless",
|
|
||||||
output = 'castle_tapestries:tapestry_long',
|
|
||||||
recipe = {'cottages:wool', 'castle_tapestries:tapestry'},
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
output = 'castle_tapestries:tapestry_very_long',
|
output = 'castle_tapestries:tapestry_very_long',
|
||||||
recipe = {'wool:white', 'castle_tapestries:tapestry_long'},
|
recipe = {'wool:white', 'castle_tapestries:tapestry_long'},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
if use_cottages then
|
||||||
type = "shapeless",
|
minetest.register_craft({
|
||||||
output = 'castle_tapestries:tapestry_very_long',
|
type = "shapeless",
|
||||||
recipe = {'cottages:wool', 'castle_tapestries:tapestry_long'},
|
output = 'castle_tapestries:tapestry',
|
||||||
})
|
recipe = {'cottages:wool', 'default:stick'},
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "shapeless",
|
||||||
|
output = 'castle_tapestries:tapestry_long',
|
||||||
|
recipe = {'cottages:wool', 'castle_tapestries:tapestry'},
|
||||||
|
})
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "shapeless",
|
||||||
|
output = 'castle_tapestries:tapestry_very_long',
|
||||||
|
recipe = {'cottages:wool', 'castle_tapestries:tapestry_long'},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
unifieddyes.register_color_craft({
|
unifieddyes.register_color_craft({
|
||||||
|
6
mod.conf
6
mod.conf
@ -1,4 +1,4 @@
|
|||||||
name = castle_tapestries
|
name = castle_tapestries
|
||||||
depends = default, unifieddyes
|
depends = default, unifieddyes, wool
|
||||||
optional_depends = intllib
|
optional_depends = intllib, cottages
|
||||||
description = This is a mod for creating medieval tapestries, as found in castles.
|
description = This is a mod for creating medieval tapestries, as found in castles.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user