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

View File

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