forked from mtcontrib/moretrees
Ensure ethereal is a compatible version if loaded (#21)
- Check that ethereal version is more than 20220424 so that it doesn't unload parts of this mod - Remove optional dependency breaking the multi-mod dependency cycle ethereal --> bakedclay --> flowerpot --> moretrees --> ethereal.
This commit is contained in:
parent
7879bd8192
commit
21bdcc360b
@ -14,6 +14,7 @@ globals = {
|
|||||||
"default",
|
"default",
|
||||||
"dump",
|
"dump",
|
||||||
"moretrees",
|
"moretrees",
|
||||||
|
"ethereal",
|
||||||
}
|
}
|
||||||
|
|
||||||
read_globals = {
|
read_globals = {
|
||||||
|
14
init.lua
14
init.lua
@ -62,6 +62,20 @@ if io.open(worldpath.."/moretrees_settings.txt","r") then
|
|||||||
dofile(worldpath.."/moretrees_settings.txt")
|
dofile(worldpath.."/moretrees_settings.txt")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Validate that if ethereal exists, that it's version is greater than 20220424.
|
||||||
|
-- Lower versions of ethereal clear registered biomes and decorations during
|
||||||
|
-- initialization which results in lost content from this mod (and others)
|
||||||
|
-- depending on where they are in the mod load order.
|
||||||
|
minetest.register_on_mods_loaded(function()
|
||||||
|
if minetest.global_exists("ethereal") then
|
||||||
|
local ethereal_ver = tonumber(ethereal.version)
|
||||||
|
if (ethereal_ver and ethereal_ver < 20220424) then
|
||||||
|
error("[moretrees] The version of ethereal detected can result " ..
|
||||||
|
"in parts of this mod and others disappearing due to mod " ..
|
||||||
|
"load order. Please update ethereal.");
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
-- infinite stacks checking
|
-- infinite stacks checking
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user