aboutsummaryrefslogtreecommitdiff
path: root/src/script/cpp_api/s_player.h
diff options
context:
space:
mode:
authorsapier <Sapier at GMX dot net>2014-06-01 14:54:21 +0200
committersapier <Sapier at GMX dot net>2014-06-01 14:54:21 +0200
commit32ab6c2a32ff4336edca87d58efe2e6fa7df6c48 (patch)
treea59d14f8f3010363faf596cb0acdfddd5d105ac0 /src/script/cpp_api/s_player.h
parent75ddf4d221301bea206311df4834903c64c566c1 (diff)
downloadminetest-32ab6c2a32ff4336edca87d58efe2e6fa7df6c48.tar.gz
minetest-32ab6c2a32ff4336edca87d58efe2e6fa7df6c48.tar.bz2
minetest-32ab6c2a32ff4336edca87d58efe2e6fa7df6c48.zip
Revert "Add daemon support for linux like operating systems"
Remove daemon support due to delayed popular vote (part 2)
Diffstat (limited to 'src/script/cpp_api/s_player.h')
0 files changed, 0 insertions, 0 deletions
lic License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #pragma once #include "common/c_types.h" #include "common/c_internal.h" #include "common/helper.h" #include "gamedef.h" #include <unordered_map> extern "C" { #include <lua.h> #include <lauxlib.h> } #ifndef SERVER class Client; class GUIEngine; #endif class ScriptApiBase; class Server; class Environment; class ServerInventoryManager; class ModApiBase : protected LuaHelper { public: static ScriptApiBase* getScriptApiBase(lua_State *L); static Server* getServer(lua_State *L); static ServerInventoryManager *getServerInventoryMgr(lua_State *L); #ifndef SERVER static Client* getClient(lua_State *L); static GUIEngine* getGuiEngine(lua_State *L); #endif // !SERVER static IGameDef* getGameDef(lua_State *L); static Environment* getEnv(lua_State *L); // When we are not loading the mod, this function returns "." static std::string getCurrentModPath(lua_State *L); // Get an arbitrary subclass of ScriptApiBase // by using dynamic_cast<> on getScriptApiBase() template<typename T> static T* getScriptApi(lua_State *L) { ScriptApiBase *scriptIface = getScriptApiBase(L); T *scriptIfaceDowncast = dynamic_cast<T*>(scriptIface); if (!scriptIfaceDowncast) { throw LuaError("Requested unavailable ScriptApi - core engine bug!"); } return scriptIfaceDowncast; }