You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

105 lines
2.7 KiB

  1. /*
  2. Minetest
  3. Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
  4. Copyright (C) 2017 nerzhul, Loic Blot <loic.blot@unix-experience.fr>
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU Lesser General Public License as published by
  7. the Free Software Foundation; either version 2.1 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU Lesser General Public License for more details.
  13. You should have received a copy of the GNU Lesser General Public License along
  14. with this program; if not, write to the Free Software Foundation, Inc.,
  15. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  16. */
  17. #ifndef L_CLIENT_H_
  18. #define L_CLIENT_H_
  19. #include "lua_api/l_base.h"
  20. #include "itemdef.h"
  21. #include "tool.h"
  22. class ModApiClient : public ModApiBase
  23. {
  24. private:
  25. // get_current_modname()
  26. static int l_get_current_modname(lua_State *L);
  27. // get_modpath(modname)
  28. static int l_get_modpath(lua_State *L);
  29. // print(text)
  30. static int l_print(lua_State *L);
  31. // display_chat_message(message)
  32. static int l_display_chat_message(lua_State *L);
  33. // send_chat_message(message)
  34. static int l_send_chat_message(lua_State *L);
  35. // clear_out_chat_queue()
  36. static int l_clear_out_chat_queue(lua_State *L);
  37. // get_player_names()
  38. static int l_get_player_names(lua_State *L);
  39. // show_formspec(name, formspec)
  40. static int l_show_formspec(lua_State *L);
  41. // send_respawn()
  42. static int l_send_respawn(lua_State *L);
  43. // disconnect()
  44. static int l_disconnect(lua_State *L);
  45. // gettext(text)
  46. static int l_gettext(lua_State *L);
  47. // get_last_run_mod(n)
  48. static int l_get_last_run_mod(lua_State *L);
  49. // set_last_run_mod(modname)
  50. static int l_set_last_run_mod(lua_State *L);
  51. // get_node(pos)
  52. static int l_get_node_or_nil(lua_State *L);
  53. static int l_get_language(lua_State *L);
  54. // get_wielded_item()
  55. static int l_get_wielded_item(lua_State *L);
  56. // get_meta(pos)
  57. static int l_get_meta(lua_State *L);
  58. static int l_sound_play(lua_State *L);
  59. static int l_sound_stop(lua_State *L);
  60. // get_server_info()
  61. static int l_get_server_info(lua_State *L);
  62. // get_item_def(itemstring)
  63. static int l_get_item_def(lua_State *L);
  64. // get_node_def(nodename)
  65. static int l_get_node_def(lua_State *L);
  66. // get_privilege_list()
  67. static int l_get_privilege_list(lua_State *L);
  68. // get_builtin_path()
  69. static int l_get_builtin_path(lua_State *L);
  70. public:
  71. static void Initialize(lua_State *L, int top);
  72. };
  73. #endif