From 9455f59b1100f3db2c5b1e88bb9d1f6a01664721 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sun, 9 Feb 2014 18:56:16 +0100 Subject: Initial Lua cChunkStay export. --- src/ChunkStay.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/ChunkStay.h') diff --git a/src/ChunkStay.h b/src/ChunkStay.h index 6eb8e1669..a6274812e 100644 --- a/src/ChunkStay.h +++ b/src/ChunkStay.h @@ -32,12 +32,16 @@ This class is abstract, the descendants are expected to provide the OnChunkAvail the OnAllChunksAvailable() callback implementations. Note that those are called from the contexts of different threads' - the caller, the Loader or the Generator thread. */ +// tolua_begin class cChunkStay { public: + // tolua_end cChunkStay(void); ~cChunkStay(); + // tolua_begin + void Clear(void); /** Adds a chunk to be locked from unloading. @@ -48,14 +52,20 @@ public: To be used only while the ChunkStay object is not enabled. */ void Remove(int a_ChunkX, int a_ChunkZ); + // tolua_end + /** Enables the ChunkStay on the specified chunkmap, causing it to load and generate chunks. All the contained chunks are queued for loading / generating. */ void Enable (cChunkMap & a_ChunkMap); + // tolua_begin + /** Disables the ChunkStay, the chunks are released and the ChunkStay object can be edited with Add() and Remove() again*/ void Disable(void); + // tolua_end + /** Returns all the chunks that should be kept */ const cChunkCoordsVector & GetChunks(void) const { return m_Chunks; } @@ -84,7 +94,7 @@ protected: /** Called by cChunkMap when a chunk is available, checks m_NumLoaded and triggers the appropriate callbacks. May be called for chunks outside this ChunkStay. */ void ChunkAvailable(int a_ChunkX, int a_ChunkZ); -} ; +} ; // tolua_export -- cgit v1.2.3