diff options
author | Elias Fleckenstein <eliasfleckenstein@web.de> | 2020-06-23 17:43:47 +0200 |
---|---|---|
committer | Elias Fleckenstein <eliasfleckenstein@web.de> | 2020-06-23 17:43:47 +0200 |
commit | a87805a9445f280ca71da322c4b32cf357744511 (patch) | |
tree | 0404bc58a6f556b0603283fdbd01121dc73d3cd9 /src/script/cpp_api/s_base.h | |
parent | 68f9263a24a345435d2310ab559ce8a811ef0427 (diff) | |
download | dragonfireclient-a87805a9445f280ca71da322c4b32cf357744511.tar.xz |
test
Diffstat (limited to 'src/script/cpp_api/s_base.h')
-rw-r--r-- | src/script/cpp_api/s_base.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/script/cpp_api/s_base.h b/src/script/cpp_api/s_base.h index 697e5f556..c45bc2c61 100644 --- a/src/script/cpp_api/s_base.h +++ b/src/script/cpp_api/s_base.h @@ -68,6 +68,7 @@ enum class ScriptingType: u8 { class Server; #ifndef SERVER class Client; +class Game; #endif class IGameDef; class Environment; @@ -106,6 +107,7 @@ public: ScriptingType getType() { return m_type; } #ifndef SERVER Client* getClient(); + Game *getGame() { return m_game; } #endif std::string getOrigin() { return m_last_run_mod; } @@ -132,6 +134,9 @@ protected: void stackDump(std::ostream &o); void setGameDef(IGameDef* gamedef) { m_gamedef = gamedef; } +#ifndef SERVER + void setGame(Game *game) { m_game = game; } +#endif Environment* getEnv() { return m_environment; } void setEnv(Environment* env) { m_environment = env; } @@ -157,6 +162,7 @@ private: lua_State *m_luastack = nullptr; IGameDef *m_gamedef = nullptr; + Game *m_game = nullptr; Environment *m_environment = nullptr; GUIEngine *m_guiengine = nullptr; ScriptingType m_type; |