scripting_client.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. #pragma once
  18. #include "cpp_api/s_base.h"
  19. #include "cpp_api/s_client.h"
  20. #include "cpp_api/s_modchannels.h"
  21. #include "cpp_api/s_security.h"
  22. class Client;
  23. class LocalPlayer;
  24. class Camera;
  25. class ClientScripting:
  26. virtual public ScriptApiBase,
  27. public ScriptApiSecurity,
  28. public ScriptApiClient,
  29. public ScriptApiModChannels
  30. {
  31. public:
  32. ClientScripting(Client *client);
  33. void on_client_ready(LocalPlayer *localplayer);
  34. void on_camera_ready(Camera *camera);
  35. private:
  36. virtual void InitializeModApi(lua_State *L, int top);
  37. };