summaryrefslogtreecommitdiffstats
path: root/src/Bindings/LuaChunkStay.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Bindings/LuaChunkStay.h21
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