Make the dependency on minetest_game optional

treecapitator works fine without default mod, so we do not need this flexibility-reducing hard dependency.
This commit is contained in:
HybridDog 2023-09-02 13:35:08 +02:00
parent 15545f9f29
commit d764f4174d
2 changed files with 64 additions and 65 deletions

View File

@ -1,3 +1,2 @@
name = treecapitator
depends = default
optional_depends = farming_plus, moretrees, ethereal
optional_depends = default, farming_plus, moretrees, ethereal

View File

@ -1,6 +1,5 @@
local mgname = minetest.get_mapgen_setting"mg_name"
if mgname == "v6" then
if minetest.get_modpath("default") then
if minetest.get_mapgen_setting"mg_name" == "v6" then
treecapitator.register_tree{
trees = {"default:tree"},
leaves = {"default:leaves"},
@ -70,6 +69,7 @@ treecapitator.register_tree({
leaves = {"default:aspen_leaves"},
range = 4,
})
end
if minetest.get_modpath("farming_plus") then
treecapitator.register_tree({