-- before loading and running any mods.
--
-local core = minetest or engine
-minetest = core
-
-- Initialize some very basic things
print = core.debug
math.randomseed(os.time())
os.setlocale("C", "numeric")
+minetest = core
-- Load other files
local scriptdir = core.get_builtin_path()..DIR_DELIM
if INIT == "game" then
dofile(gamepath.."init.lua")
elseif INIT == "mainmenu" then
- dofile(core.get_mainmenu_path()..DIR_DELIM.."init.lua")
+ local mainmenuscript = core.setting_get("main_menu_script")
+ if mainmenuscript ~= nil and mainmenuscript ~= "" then
+ dofile(mainmenuscript)
+ else
+ dofile(core.get_mainmenu_path()..DIR_DELIM.."init.lua")
+ end
elseif INIT == "async" then
dofile(asyncpath.."init.lua")
else