Make all depends optional except default (#8)

Registers flowerpots based on mods that are enabled and supported.
This commit is contained in:
Louis Royer 2020-02-15 11:59:39 +01:00 committed by GitHub
parent d346732a86
commit f3d5285337
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 5 deletions

View File

@ -173,8 +173,8 @@ minetest.register_craft({
}
})
-- default farming nodes
for _, node in pairs({
-- default nodes
"default:acacia_bush_sapling",
"default:acacia_bush_stem",
"default:acacia_sapling",
@ -206,6 +206,7 @@ for _, node in pairs({
"default:fern_1",
"default:fern_2",
"default:fern_3",
-- farming nodes
"farming:cotton_1",
"farming:cotton_2",
"farming:cotton_3",
@ -222,6 +223,7 @@ for _, node in pairs({
"farming:wheat_6",
"farming:wheat_7",
"farming:wheat_8",
-- flowers nodes
"flowers:dandelion_white",
"flowers:dandelion_yellow",
"flowers:geranium",
@ -232,6 +234,7 @@ for _, node in pairs({
"flowers:viola",
"flowers:chrysanthemum_green",
"flowers:tulip_black",
-- moretrees nodes
"moretrees:beech_sapling",
"moretrees:apple_tree_sapling",
"moretrees:oak_sapling",
@ -260,6 +263,7 @@ for _, node in pairs({
"moretrees:rubber_tree_sapling_ongen",
"moretrees:fir_sapling_ongen",
"moretrees:jungletree_sapling_ongen",
-- dryplants nodes
"dryplants:grass",
"dryplants:grass_short",
"dryplants:hay",
@ -273,10 +277,13 @@ for _, node in pairs({
"dryplants:reedmace",
"dryplants:reedmace_bottom",
"dryplants:reedmace_sapling",
-- poisonivy nodes
"poisonivy:seedling",
"poisonivy:sproutling",
"poisonivy:climbing",
}) do
if minetest.registered_nodes[node] then
flowerpot.register_node(node)
end
end

View File

@ -1,4 +1,4 @@
name = flowerpot
depends = default, farming, flowers
optional_depends = moretrees, dryplants, poisonivy
depends = default
optional_depends = moretrees, dryplants, poisonivy, farming, flowers
description = A stylish flowerpot that can contain most plants.