mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-06-07 06:06:10 -04:00
Only register dye crafts from flower group if flower exists
This commit is contained in:
parent
5d28040915
commit
2320f23047
1 changed files with 12 additions and 5 deletions
|
@ -39,12 +39,19 @@ for _, row in ipairs(dyelocal.dyes) do
|
||||||
description = description,
|
description = description,
|
||||||
groups = groups
|
groups = groups
|
||||||
})
|
})
|
||||||
|
local flowers = {"white", "violet", "blue", "yellow", "orange", "red"}
|
||||||
|
|
||||||
|
for i=1, #flowers do
|
||||||
|
if flowers[i] == name then
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
output = item_name.." 4",
|
output = item_name.." 4",
|
||||||
recipe = {"group:flower,color_"..name},
|
recipe = {"group:flower,color_"..name},
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- manually add coal->black dye
|
-- manually add coal->black dye
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "shapeless",
|
type = "shapeless",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue