summaryrefslogtreecommitdiff
path: root/src/script/cpp_api/s_base.h
diff options
context:
space:
mode:
authorShadowNinja <shadowninja@minetest.net>2017-06-03 14:55:10 -0400
committerShadowNinja <shadowninja@minetest.net>2017-06-03 14:55:10 -0400
commitcaecdb681c428c1aab9c0f7eec2570c0460f995c (patch)
treee5115982ea59bbf2343ba9b35bc4a0cfbb56f407 /src/script/cpp_api/s_base.h
parent81d56b94919dceb7b2e51d70b21a7ca22f852bd5 (diff)
parent80dc961d24e1964e25d57039ddb2ba639f9f4d22 (diff)
downloadminetest-caecdb681c428c1aab9c0f7eec2570c0460f995c.tar.gz
minetest-caecdb681c428c1aab9c0f7eec2570c0460f995c.tar.bz2
minetest-caecdb681c428c1aab9c0f7eec2570c0460f995c.zip
Merge 0.4.16 into stable-0.4
Diffstat (limited to 'src/script/cpp_api/s_base.h')
-rw-r--r--src/script/cpp_api/s_base.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/script/cpp_api/s_base.h b/src/script/cpp_api/s_base.h
index f52474f00..5b047a081 100644
--- a/src/script/cpp_api/s_base.h
+++ b/src/script/cpp_api/s_base.h
@@ -55,6 +55,10 @@ extern "C" {
setOriginFromTableRaw(index, __FUNCTION__)
class Server;
+#ifndef SERVER
+class Client;
+#endif
+class IGameDef;
class Environment;
class GUIEngine;
class ServerActiveObject;
@@ -75,7 +79,11 @@ public:
void addObjectReference(ServerActiveObject *cobj);
void removeObjectReference(ServerActiveObject *cobj);
- Server* getServer() { return m_server; }
+ IGameDef *getGameDef() { return m_gamedef; }
+ Server* getServer();
+#ifndef SERVER
+ Client* getClient();
+#endif
std::string getOrigin() { return m_last_run_mod; }
void setOriginDirect(const char *origin);
@@ -98,7 +106,7 @@ protected:
void scriptError(int result, const char *fxn);
void stackDump(std::ostream &o);
- void setServer(Server* server) { m_server = server; }
+ void setGameDef(IGameDef* gamedef) { m_gamedef = gamedef; }
Environment* getEnv() { return m_environment; }
void setEnv(Environment* env) { m_environment = env; }
@@ -107,7 +115,6 @@ protected:
void setGuiEngine(GUIEngine* guiengine) { m_guiengine = guiengine; }
void objectrefGetOrCreate(lua_State *L, ServerActiveObject *cobj);
- void objectrefGet(lua_State *L, u16 id);
RecursiveMutex m_luastackmutex;
std::string m_last_run_mod;
@@ -118,9 +125,11 @@ protected:
#endif
private:
+ static int luaPanic(lua_State *L);
+
lua_State* m_luastack;
- Server* m_server;
+ IGameDef* m_gamedef;
Environment* m_environment;
GUIEngine* m_guiengine;
};