diff options
author | ShadowNinja <shadowninja@minetest.net> | 2014-04-27 21:02:48 -0400 |
---|---|---|
committer | ShadowNinja <shadowninja@minetest.net> | 2014-05-08 13:02:04 -0400 |
commit | c4359ff65cd8e4e754442b9f2ef7051a8eaa4241 (patch) | |
tree | feaad8be8c36cc4a0abdbe8d7b84db3ac68ed87e /builtin/mainmenu | |
parent | 1cd512913e4d4ad1fb43d4b6e3d7971bb6c67528 (diff) | |
download | minetest-c4359ff65cd8e4e754442b9f2ef7051a8eaa4241.tar.gz minetest-c4359ff65cd8e4e754442b9f2ef7051a8eaa4241.tar.bz2 minetest-c4359ff65cd8e4e754442b9f2ef7051a8eaa4241.zip |
Use "core" namespace internally
Diffstat (limited to 'builtin/mainmenu')
-rw-r--r-- | builtin/mainmenu/init.lua | 7 | ||||
-rw-r--r-- | builtin/mainmenu/modmgr.lua | 14 |
2 files changed, 7 insertions, 14 deletions
diff --git a/builtin/mainmenu/init.lua b/builtin/mainmenu/init.lua index d78a668c5..58e9ab949 100644 --- a/builtin/mainmenu/init.lua +++ b/builtin/mainmenu/init.lua @@ -1,6 +1,7 @@ -local menupath = engine.get_mainmenu_path()..DIR_DELIM -local commonpath = engine.get_builtin_path()..DIR_DELIM.."common"..DIR_DELIM +engine = core +local menupath = core.get_mainmenu_path()..DIR_DELIM +local commonpath = core.get_builtin_path()..DIR_DELIM.."common"..DIR_DELIM dofile(menupath.."filterlist.lua") dofile(menupath.."modmgr.lua") @@ -217,7 +218,7 @@ function menu.asyncOnlineFavourites() menu.favorites = {} engine.handle_async( function(param) - return engine.get_favorites("online") + --return core.get_favorites("online") end, nil, function(result) diff --git a/builtin/mainmenu/modmgr.lua b/builtin/mainmenu/modmgr.lua index eeb65add1..baf61d2a5 100644 --- a/builtin/mainmenu/modmgr.lua +++ b/builtin/mainmenu/modmgr.lua @@ -193,16 +193,9 @@ function modmgr.identify_modname(modpath,filename) while line~= nil do local modname = nil - if line:find("minetest.register_tool") then - modname = modmgr.parse_register_line(line) - end - - if line:find("minetest.register_craftitem") then - modname = modmgr.parse_register_line(line) - end - - - if line:find("minetest.register_node") then + if line:find("register_tool") or + line:find("register_craftitem") or + line:find("register_node") then modname = modmgr.parse_register_line(line) end @@ -225,7 +218,6 @@ end -------------------------------------------------------------------------------- function modmgr.tab() - if modmgr.global_mods == nil then modmgr.refresh_globals() end |