aboutsummaryrefslogtreecommitdiff
path: root/advtrains/textures/advtrains_dtrack_shared_detector_off.png
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2021-02-03 09:30:44 +0100
committerorwell96 <orwell@bleipb.de>2021-02-03 09:30:44 +0100
commit8ae405f00f7073bca8cb621612ab11bc730228a3 (patch)
tree8eb6d7b055df6cf2be0887cf7b3b85532e47ead2 /advtrains/textures/advtrains_dtrack_shared_detector_off.png
parentd8d1d27ccb622dfc8e80eb5eb44e6020a1655389 (diff)
downloadadvtrains-8ae405f00f7073bca8cb621612ab11bc730228a3.tar.gz
advtrains-8ae405f00f7073bca8cb621612ab11bc730228a3.tar.bz2
advtrains-8ae405f00f7073bca8cb621612ab11bc730228a3.zip
Discard get_node_or_nil() for area-loaded check and use either a distance-based approach or minetest.is_block_active() if available
See also https://github.com/minetest/minetest/pull/10897
Diffstat (limited to 'advtrains/textures/advtrains_dtrack_shared_detector_off.png')
0 files changed, 0 insertions, 0 deletions
l ppc">#include "lua_api/l_mainmenu.h" #include "lua_api/l_sound.h" #include "lua_api/l_util.h" #include "lua_api/l_settings.h" #include "log.h" extern "C" { #include "lualib.h" } #define MAINMENU_NUM_ASYNC_THREADS 4 MainMenuScripting::MainMenuScripting(GUIEngine* guiengine): ScriptApiBase(ScriptingType::MainMenu) { setGuiEngine(guiengine); SCRIPTAPI_PRECHECKHEADER lua_getglobal(L, "core"); int top = lua_gettop(L); lua_newtable(L); lua_setglobal(L, "gamedata"); // Initialize our lua_api modules initializeModApi(L, top); lua_pop(L, 1); // Push builtin initialization type lua_pushstring(L, "mainmenu"); lua_setglobal(L, "INIT"); infostream << "SCRIPTAPI: Initialized main menu modules" << std::endl; } /******************************************************************************/ void MainMenuScripting::initializeModApi(lua_State *L, int top) { registerLuaClasses(L, top); // Initialize mod API modules ModApiMainMenu::Initialize(L, top); ModApiUtil::Initialize(L, top); ModApiSound::Initialize(L, top); ModApiHttp::Initialize(L, top); asyncEngine.registerStateInitializer(registerLuaClasses); asyncEngine.registerStateInitializer(ModApiMainMenu::InitializeAsync); asyncEngine.registerStateInitializer(ModApiUtil::InitializeAsync); asyncEngine.registerStateInitializer(ModApiHttp::InitializeAsync); // Initialize async environment //TODO possibly make number of async threads configurable asyncEngine.initialize(MAINMENU_NUM_ASYNC_THREADS); } /******************************************************************************/ void MainMenuScripting::registerLuaClasses(lua_State *L, int top) { LuaSettings::Register(L); } /******************************************************************************/ void MainMenuScripting::step() { asyncEngine.step(getStack());