summaryrefslogtreecommitdiffstats
path: root/src/Bindings/LuaChunkStay.h
diff options
context:
space:
mode:
authorLogicParrot <LogicParrot@users.noreply.github.com>2016-02-05 22:45:45 +0100
committerLogicParrot <LogicParrot@users.noreply.github.com>2016-02-05 22:50:18 +0100
commitca6ef58b1ee8521e4b940ee4883dee714960e413 (patch)
tree8532add455224b07c07a759e3d906f50c0695888 /src/Bindings/LuaChunkStay.h
parentMerge pull request #2972 from marvinkopf/PlayerAutoComplete (diff)
downloadcuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar
cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar.gz
cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar.bz2
cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar.lz
cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar.xz
cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.tar.zst
cuberite-ca6ef58b1ee8521e4b940ee4883dee714960e413.zip
Diffstat (limited to 'src/Bindings/LuaChunkStay.h')
-rw-r--r--src/Bindings/LuaChunkStay.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/Bindings/LuaChunkStay.h b/src/Bindings/LuaChunkStay.h
index d76b67de9..a455d2502 100644
--- a/src/Bindings/LuaChunkStay.h
+++ b/src/Bindings/LuaChunkStay.h
@@ -28,38 +28,38 @@ class cLuaChunkStay
: public cChunkStay
{
typedef cChunkStay super;
-
+
public:
cLuaChunkStay(cPluginLua & a_Plugin);
-
+
~cLuaChunkStay() { }
/** Adds chunks in the specified on-stack Lua table.
Returns true if any chunk added, false (plus log warning) if none. */
bool AddChunks(int a_ChunkCoordTableStackPos);
-
+
/** Enables the ChunkStay for the specified chunkmap, with the specified Lua callbacks. */
void Enable(cChunkMap & a_ChunkMap, int a_OnChunkAvailableStackPos, int a_OnAllChunksAvailableStackPos);
-
+
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::cRef m_OnChunkAvailable;
-
+
/** The Lua function to call in OnAllChunksAvailable. Only valid when enabled. */
cLuaState::cRef m_OnAllChunksAvailable;
-
-
+
+
// cChunkStay overrides:
virtual void OnChunkAvailable(int a_ChunkX, int a_ChunkZ) override;
virtual bool OnAllChunksAvailable(void) override;
virtual void OnDisabled(void) override;
-
+
/** Adds a single chunk coord from the table at the top of the Lua stack.
Expects the top element to be a table, checks that it contains two numbers.
Uses those two numbers as chunk coords appended to m_Chunks.