diff options
author | madmaxoft <github@xoft.cz> | 2014-02-09 20:39:45 +0100 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-02-09 20:39:45 +0100 |
commit | 47a497fa895fa5f353ba593d4bb232ea514e66c9 (patch) | |
tree | 59be3c7320d5c4f8b8d25aa2a28769e66de8921b /src/Bindings/LuaChunkStay.h | |
parent | Debuggers: Disabled testing plugin calls. (diff) | |
download | cuberite-47a497fa895fa5f353ba593d4bb232ea514e66c9.tar cuberite-47a497fa895fa5f353ba593d4bb232ea514e66c9.tar.gz cuberite-47a497fa895fa5f353ba593d4bb232ea514e66c9.tar.bz2 cuberite-47a497fa895fa5f353ba593d4bb232ea514e66c9.tar.lz cuberite-47a497fa895fa5f353ba593d4bb232ea514e66c9.tar.xz cuberite-47a497fa895fa5f353ba593d4bb232ea514e66c9.tar.zst cuberite-47a497fa895fa5f353ba593d4bb232ea514e66c9.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Bindings/LuaChunkStay.h | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/Bindings/LuaChunkStay.h b/src/Bindings/LuaChunkStay.h index e9d87d7f6..0ab73f669 100644 --- a/src/Bindings/LuaChunkStay.h +++ b/src/Bindings/LuaChunkStay.h @@ -24,23 +24,28 @@ class cLuaChunkStay public: // Allow Lua to construct objects of this class: - cLuaChunkStay(void) {} + cLuaChunkStay(void); // Allow Lua to garbage-collect objects of this class: - ~cLuaChunkStay() {} + ~cLuaChunkStay() { } // tolua_end - /** Enabled the ChunkStay for the specified world, with the specified Lua callbacks. + /** Enables the ChunkStay for the specified world, with the specified Lua callbacks. Exported in ManualBindings. */ void Enable( - cWorld & a_World, cLuaState & a_LuaState, - const cLuaState::cRef & a_OnChunkAvailable, const cLuaState::cRef & a_OnAllChunksAvailable + cWorld & a_World, lua_State * a_LuaState, + int a_OnChunkAvailableStackPos, int a_OnAllChunksAvailableStackPos ); + // tolua_begin + + /** Disables the ChunkStay. Cleans up the bound Lua state and callbacks */ + virtual void Disable(void); + protected: /** The Lua state associated with the callbacks. Only valid when enabled. */ - cLuaState * m_LuaState; + cLuaState m_LuaState; /** The Lua function to call in OnChunkAvailable. Only valid when enabled. */ cLuaState::cRef m_OnChunkAvailable; @@ -51,7 +56,9 @@ protected: // cChunkStay overrides: virtual void OnChunkAvailable(int a_ChunkX, int a_ChunkZ) override; virtual void OnAllChunksAvailable(void) override; -} ; // tolua_export +} ; + +// tolua_end |