summaryrefslogtreecommitdiffstats
path: root/src/Bindings/LuaChunkStay.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2016-08-14 16:26:31 +0200
committerGitHub <noreply@github.com>2016-08-14 16:26:31 +0200
commit0f51f7e35883936a64857a12ca5a97eaa1c9e190 (patch)
tree0992f490337ae8c2339348dfd03c54e82c8fbed9 /src/Bindings/LuaChunkStay.h
parentMerge pull request #3072 from cuberite/blockclumps (diff)
downloadcuberite-0f51f7e35883936a64857a12ca5a97eaa1c9e190.tar
cuberite-0f51f7e35883936a64857a12ca5a97eaa1c9e190.tar.gz
cuberite-0f51f7e35883936a64857a12ca5a97eaa1c9e190.tar.bz2
cuberite-0f51f7e35883936a64857a12ca5a97eaa1c9e190.tar.lz
cuberite-0f51f7e35883936a64857a12ca5a97eaa1c9e190.tar.xz
cuberite-0f51f7e35883936a64857a12ca5a97eaa1c9e190.tar.zst
cuberite-0f51f7e35883936a64857a12ca5a97eaa1c9e190.zip
Diffstat (limited to 'src/Bindings/LuaChunkStay.h')
-rw-r--r--src/Bindings/LuaChunkStay.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/Bindings/LuaChunkStay.h b/src/Bindings/LuaChunkStay.h
index 51356d5b7..175260978 100644
--- a/src/Bindings/LuaChunkStay.h
+++ b/src/Bindings/LuaChunkStay.h
@@ -30,24 +30,19 @@ class cLuaChunkStay
typedef cChunkStay super;
public:
- cLuaChunkStay(cPluginLua & a_Plugin);
+ cLuaChunkStay();
~cLuaChunkStay() { }
- /** Adds chunks in the specified on-stack Lua table.
+ /** Adds chunks in the specified Lua table.
+ Can be called only once.
Returns true if any chunk added, false (plus log warning) if none. */
- bool AddChunks(int a_ChunkCoordTableStackPos);
+ bool AddChunks(const cLuaState::cStackTable & a_ChunkCoords);
/** Enables the ChunkStay for the specified chunkmap, with the specified Lua callbacks. */
void Enable(cChunkMap & a_ChunkMap, cLuaState::cCallbackPtr a_OnChunkAvailable, cLuaState::cCallbackPtr a_OnAllChunksAvailable);
protected:
- /** The plugin which has created the ChunkStay, via cWorld:ChunkStay() binding method. */
- cPluginLua & m_Plugin;
-
- /** The Lua state associated with the callbacks. Only valid when enabled. */
- cLuaState * m_LuaState;
-
/** The Lua function to call in OnChunkAvailable. Only valid when enabled. */
cLuaState::cCallbackPtr m_OnChunkAvailable;