From 2818d3f2244d2146a5cdb61cd41f6561c514f97c Mon Sep 17 00:00:00 2001 From: ShadowNinja Date: Tue, 25 Apr 2017 13:38:08 -0400 Subject: Rename Scripting API files for consistency --- src/script/scripting_server.h | 57 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 src/script/scripting_server.h (limited to 'src/script/scripting_server.h') diff --git a/src/script/scripting_server.h b/src/script/scripting_server.h new file mode 100644 index 000000000..fd97ea40b --- /dev/null +++ b/src/script/scripting_server.h @@ -0,0 +1,57 @@ +/* +Minetest +Copyright (C) 2013 celeron55, Perttu Ahola + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 2.1 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without 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. +*/ + +#ifndef SERVER_SCRIPTING_H_ +#define SERVER_SCRIPTING_H_ + +#include "cpp_api/s_base.h" +#include "cpp_api/s_entity.h" +#include "cpp_api/s_env.h" +#include "cpp_api/s_inventory.h" +#include "cpp_api/s_node.h" +#include "cpp_api/s_player.h" +#include "cpp_api/s_server.h" +#include "cpp_api/s_security.h" + +/*****************************************************************************/ +/* Scripting <-> Server Game Interface */ +/*****************************************************************************/ + +class ServerScripting: + virtual public ScriptApiBase, + public ScriptApiDetached, + public ScriptApiEntity, + public ScriptApiEnv, + public ScriptApiNode, + public ScriptApiPlayer, + public ScriptApiServer, + public ScriptApiSecurity +{ +public: + ServerScripting(Server* server); + + // use ScriptApiBase::loadMod() to load mods + +private: + void InitializeModApi(lua_State *L, int top); +}; + +void log_deprecated(const std::string &message); + +#endif /* SCRIPTING_GAME_H_ */ -- cgit v1.2.3 From b82e5ec8804e9058b48f3d2a168a4c019a777055 Mon Sep 17 00:00:00 2001 From: Loïc Blot Date: Thu, 27 Apr 2017 11:52:44 +0200 Subject: Don't permit to copy Scripting classes (Client,Server,Mainmenu) --- src/script/scripting_client.h | 2 ++ src/script/scripting_mainmenu.h | 2 ++ src/script/scripting_server.h | 2 ++ 3 files changed, 6 insertions(+) (limited to 'src/script/scripting_server.h') diff --git a/src/script/scripting_client.h b/src/script/scripting_client.h index df94e8b71..b3451e409 100644 --- a/src/script/scripting_client.h +++ b/src/script/scripting_client.h @@ -24,6 +24,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "cpp_api/s_base.h" #include "cpp_api/s_client.h" #include "cpp_api/s_security.h" +#include "util/basic_macros.h" class Client; class LocalPlayer; @@ -38,5 +39,6 @@ public: private: virtual void InitializeModApi(lua_State *L, int top); + DISABLE_CLASS_COPY(ClientScripting); }; #endif diff --git a/src/script/scripting_mainmenu.h b/src/script/scripting_mainmenu.h index a1385ba9c..9aacd55d6 100644 --- a/src/script/scripting_mainmenu.h +++ b/src/script/scripting_mainmenu.h @@ -23,6 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "cpp_api/s_base.h" #include "cpp_api/s_mainmenu.h" #include "cpp_api/s_async.h" +#include "util/basic_macros.h" /*****************************************************************************/ /* Scripting <-> Main Menu Interface */ @@ -45,6 +46,7 @@ private: void initializeModApi(lua_State *L, int top); AsyncEngine asyncEngine; + DISABLE_CLASS_COPY(MainMenuScripting); }; diff --git a/src/script/scripting_server.h b/src/script/scripting_server.h index fd97ea40b..1b335406e 100644 --- a/src/script/scripting_server.h +++ b/src/script/scripting_server.h @@ -28,6 +28,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "cpp_api/s_player.h" #include "cpp_api/s_server.h" #include "cpp_api/s_security.h" +#include "util/basic_macros.h" /*****************************************************************************/ /* Scripting <-> Server Game Interface */ @@ -50,6 +51,7 @@ public: private: void InitializeModApi(lua_State *L, int top); + DISABLE_CLASS_COPY(ServerScripting); }; void log_deprecated(const std::string &message); -- cgit v1.2.3