summaryrefslogtreecommitdiffstats
path: root/src/ChunkStay.h
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-02-09 18:56:16 +0100
committermadmaxoft <github@xoft.cz>2014-02-09 18:56:16 +0100
commit9455f59b1100f3db2c5b1e88bb9d1f6a01664721 (patch)
tree5a6fcca8728b60dc357baf104009eae1bccdb4d4 /src/ChunkStay.h
parentcLuaState::cRef can be unbound and re-bound. (diff)
downloadcuberite-9455f59b1100f3db2c5b1e88bb9d1f6a01664721.tar
cuberite-9455f59b1100f3db2c5b1e88bb9d1f6a01664721.tar.gz
cuberite-9455f59b1100f3db2c5b1e88bb9d1f6a01664721.tar.bz2
cuberite-9455f59b1100f3db2c5b1e88bb9d1f6a01664721.tar.lz
cuberite-9455f59b1100f3db2c5b1e88bb9d1f6a01664721.tar.xz
cuberite-9455f59b1100f3db2c5b1e88bb9d1f6a01664721.tar.zst
cuberite-9455f59b1100f3db2c5b1e88bb9d1f6a01664721.zip
Diffstat (limited to '')
-rw-r--r--src/ChunkStay.h12
1 files changed, 11 insertions, 1 deletions
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