aboutsummaryrefslogtreecommitdiff
path: root/src/activeobject.h
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2015-09-08 18:29:02 +0200
committerest31 <MTest31@outlook.com>2015-09-08 21:23:09 +0200
commit1f1e14ab7fe1680eae12955929be004af7f39fe4 (patch)
treeb3886624c78b77dabe549997a641e880dbb99128 /src/activeobject.h
parentfe6575b8d38b29026adb9bf3d6226b5b3ceb4cab (diff)
downloadminetest-1f1e14ab7fe1680eae12955929be004af7f39fe4.tar.gz
minetest-1f1e14ab7fe1680eae12955929be004af7f39fe4.tar.bz2
minetest-1f1e14ab7fe1680eae12955929be004af7f39fe4.zip
Change m_client_event_queue's type to std::queue
As indica/* Minetest Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com> This program is free software; you can redistribute it and/or modify it under the terms of
0 files changed, 0 insertions, 0 deletions
hout even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "cpp_api/s_mainmenu.h" #include "cpp_api/s_internal.h" #include "common/c_converter.h" void ScriptApiMainMenu::setMainMenuErrorMessage(std::string errormessage) { SCRIPTAPI_PRECHECKHEADER lua_getglobal(L, "gamedata"); int gamedata_idx = lua_gettop(L); lua_pushstring(L, "errormessage"); lua_pushstring(L, errormessage.c_str()); lua_settable(L, gamedata_idx); lua_pop(L, 1); } void ScriptApiMainMenu::handleMainMenuEvent(std::string text) { SCRIPTAPI_PRECHECKHEADER // Get handler function lua_getglobal(L, "core"); lua_getfield(L, -1, "event_handler"); lua_remove(L, -2); // Remove core if (lua_isnil(L, -1)) { lua_pop(L, 1); // Pop event_handler return; } luaL_checktype(L, -1, LUA_TFUNCTION); // Call it