mirror of
https://github.com/FaceDeer/dfcaverns.git
synced 2025-01-12 11:10:28 +01:00
add checks for submods being present
the df_trees and df_farming checks are likely redundant, but if primordial layers are disabled someone might not have df_primordial_items installed.
This commit is contained in:
parent
5906308d87
commit
11667e184e
@ -8,6 +8,7 @@ end
|
|||||||
|
|
||||||
if df_caverns.config.restrict_trees_to_biomes then
|
if df_caverns.config.restrict_trees_to_biomes then
|
||||||
|
|
||||||
|
if minetest.get_modpath("df_trees") then
|
||||||
add_biome_restrictions(df_trees, "black_cap_growth_permitted", {blackcap = true})
|
add_biome_restrictions(df_trees, "black_cap_growth_permitted", {blackcap = true})
|
||||||
add_biome_restrictions(df_trees, "blood_thorn_growth_permitted", {bloodthorn = true})
|
add_biome_restrictions(df_trees, "blood_thorn_growth_permitted", {bloodthorn = true})
|
||||||
add_biome_restrictions(df_trees, "fungiwood_growth_permitted", {fungiwood = true, fungispore = true})
|
add_biome_restrictions(df_trees, "fungiwood_growth_permitted", {fungiwood = true, fungispore = true})
|
||||||
@ -16,20 +17,22 @@ if df_caverns.config.restrict_trees_to_biomes then
|
|||||||
add_biome_restrictions(df_trees, "spore_tree_growth_permitted", {sporetree = true, fungispore = true})
|
add_biome_restrictions(df_trees, "spore_tree_growth_permitted", {sporetree = true, fungispore = true})
|
||||||
add_biome_restrictions(df_trees, "tower_cap_growth_permitted", {towercap = true, towergoblin = true})
|
add_biome_restrictions(df_trees, "tower_cap_growth_permitted", {towercap = true, towergoblin = true})
|
||||||
add_biome_restrictions(df_trees, "tunnel_tube_growth_permitted", {tunneltube = true})
|
add_biome_restrictions(df_trees, "tunnel_tube_growth_permitted", {tunneltube = true})
|
||||||
|
end
|
||||||
|
|
||||||
-- Deliberately not biome-restricted
|
-- Deliberately not biome-restricted
|
||||||
--add_biome_restrictions(df_trees, "torchspine_growth_permitted", {})
|
--add_biome_restrictions(df_trees, "torchspine_growth_permitted", {})
|
||||||
--add_biome_restrictions(df_trees, "spindlestem_growth_permitted", {})
|
--add_biome_restrictions(df_trees, "spindlestem_growth_permitted", {})
|
||||||
|
if minetest.get_modpath("df_primordial_items") then
|
||||||
add_biome_restrictions(df_primordial_items, "primordial_mushroom_growth_permitted", {["primordial fungus"] = true})
|
add_biome_restrictions(df_primordial_items, "primordial_mushroom_growth_permitted", {["primordial fungus"] = true})
|
||||||
add_biome_restrictions(df_primordial_items, "giant_mycelium_growth_permitted", {["primordial fungus"] = true})
|
add_biome_restrictions(df_primordial_items, "giant_mycelium_growth_permitted", {["primordial fungus"] = true})
|
||||||
add_biome_restrictions(df_primordial_items, "giant_fern_growth_permitted", {["primordial jungle"] = true})
|
add_biome_restrictions(df_primordial_items, "giant_fern_growth_permitted", {["primordial jungle"] = true})
|
||||||
add_biome_restrictions(df_primordial_items, "jungle_mushroom_growth_permitted", {["primordial jungle"] = true})
|
add_biome_restrictions(df_primordial_items, "jungle_mushroom_growth_permitted", {["primordial jungle"] = true})
|
||||||
add_biome_restrictions(df_primordial_items, "jungletree_growth_permitted", {["primordial jungle"] = true})
|
add_biome_restrictions(df_primordial_items, "jungletree_growth_permitted", {["primordial jungle"] = true})
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if df_caverns.config.restrict_farmables_to_biomes then
|
if df_caverns.config.restrict_farmables_to_biomes and minetest.get_modpath("df_farming") then
|
||||||
add_biome_restrictions(df_farming.growth_permitted, "df_farming:cave_wheat_seed",
|
add_biome_restrictions(df_farming.growth_permitted, "df_farming:cave_wheat_seed",
|
||||||
{fungiwood = true, tunneltube = true, sporetree = true, fungispore = true})
|
{fungiwood = true, tunneltube = true, sporetree = true, fungispore = true})
|
||||||
add_biome_restrictions(df_farming.growth_permitted, "df_farming:dimple_cup_seed",
|
add_biome_restrictions(df_farming.growth_permitted, "df_farming:dimple_cup_seed",
|
||||||
|
Loading…
Reference in New Issue
Block a user