1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Use "core" namespace internally

This commit is contained in:
ShadowNinja 2014-04-27 21:02:48 -04:00
parent 1cd512913e
commit c4359ff65c
45 changed files with 812 additions and 843 deletions

View file

@ -38,9 +38,9 @@ void ScriptApiMainMenu::handleMainMenuEvent(std::string text)
SCRIPTAPI_PRECHECKHEADER
// Get handler function
lua_getglobal(L, "engine");
lua_getglobal(L, "core");
lua_getfield(L, -1, "event_handler");
lua_remove(L, -2); // Remove engine
lua_remove(L, -2); // Remove core
if (lua_isnil(L, -1)) {
lua_pop(L, 1); // Pop event_handler
return;
@ -58,9 +58,9 @@ void ScriptApiMainMenu::handleMainMenuButtons(std::map<std::string, std::string>
SCRIPTAPI_PRECHECKHEADER
// Get handler function
lua_getglobal(L, "engine");
lua_getglobal(L, "core");
lua_getfield(L, -1, "button_handler");
lua_remove(L, -2); // Remove engine
lua_remove(L, -2); // Remove core
if (lua_isnil(L, -1)) {
lua_pop(L, 1); // Pop button handler
return;