Activate main menu
This commit is contained in:
parent
479c595da3
commit
72e92d3233
|
@ -0,0 +1,21 @@
|
||||||
|
if not minetest.is_singleplayer() then
|
||||||
|
error("Main menu changes work only in singleplayer mode.")
|
||||||
|
end
|
||||||
|
|
||||||
|
local current_main_menu_path = minetest.settings:get("main_menu_path")
|
||||||
|
local main_menu_path = minetest.get_modpath("mainmenu_csm") .. '/builtin/mainmenu'
|
||||||
|
if current_main_menu_path ~= main_menu_path then
|
||||||
|
minetest.register_on_joinplayer(
|
||||||
|
function()
|
||||||
|
minetest.settings:set("main_menu_path", main_menu_path)
|
||||||
|
minetest.kick_player(
|
||||||
|
"singleplayer",
|
||||||
|
[[
|
||||||
|
CSM tab added to main menu.
|
||||||
|
|
||||||
|
Reconnect to play the game.
|
||||||
|
]]
|
||||||
|
)
|
||||||
|
end
|
||||||
|
)
|
||||||
|
end
|
Loading…
Reference in New Issue