See issues in the check for doors mod, you added in last commit.
At the first you have to add doors into optional dependencies of maple mod. Otherwise it can happends the maple is loaded before doors is loaded because of not defined loading order. Without the dependency it is not possible to register doors because the doors mod is not loaded at this point.
To check if a mod is enabled in game, minetest.get_modpath("modname") is usually used. This check is not nil even the mod is enabled but not loaded yet because of loading order. Useful for recipes, that does not deed the depending mod loaded.
The other way is to check if the global variable exists.
If you like this way, please use if minetest.global_exists("doors") then instead of just if doors then. The short produces a developer warning about access to not existing global variable into log if doors not enabled. Of course the global exists only if the mod is previously loaded. So optional dependency is required for this check
See issues in the check for doors mod, you added in last commit.
At the first you have to add doors into optional dependencies of maple mod. Otherwise it can happends the maple is loaded before doors is loaded because of not defined loading order. Without the dependency it is not possible to register doors because the doors mod is not loaded at this point.
To check if a mod is enabled in game, `minetest.get_modpath("modname")` is usually used. This check is not nil even the mod is enabled but not loaded yet because of loading order. Useful for recipes, that does not deed the depending mod loaded.
The other way is to check if the global variable exists.
If you like this way, please use `if minetest.global_exists("doors") then` instead of just `if doors then`. The short produces a developer warning about access to not existing global variable into log if doors not enabled. Of course the global exists only if the mod is previously loaded. So optional dependency is required for this check
See issues in the check for doors mod, you added in last commit.
At the first you have to add doors into optional dependencies of maple mod. Otherwise it can happends the maple is loaded before doors is loaded because of not defined loading order. Without the dependency it is not possible to register doors because the doors mod is not loaded at this point.
To check if a mod is enabled in game,
minetest.get_modpath("modname")is usually used. This check is not nil even the mod is enabled but not loaded yet because of loading order. Useful for recipes, that does not deed the depending mod loaded.The other way is to check if the global variable exists. If you like this way, please use
if minetest.global_exists("doors") theninstead of justif doors then. The short produces a developer warning about access to not existing global variable into log if doors not enabled. Of course the global exists only if the mod is previously loaded. So optional dependency is required for this checkVery good points. Thank you for the tips. I made corrections in
56ec0692c6