summaryrefslogtreecommitdiffstats
path: root/src/Bindings/LuaState.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-02-07 17:46:16 +0100
committerMattes D <github@xoft.cz>2015-02-07 17:46:16 +0100
commit512b1a6b0e3d68c62f638399061e129dcf61067f (patch)
tree0201d601f4f5e125a22298b730ac4903fa264415 /src/Bindings/LuaState.h
parentMerge pull request #1727 from mc-server/Entities (diff)
parentAPIDump: Added client and server examples. (diff)
downloadcuberite-512b1a6b0e3d68c62f638399061e129dcf61067f.tar
cuberite-512b1a6b0e3d68c62f638399061e129dcf61067f.tar.gz
cuberite-512b1a6b0e3d68c62f638399061e129dcf61067f.tar.bz2
cuberite-512b1a6b0e3d68c62f638399061e129dcf61067f.tar.lz
cuberite-512b1a6b0e3d68c62f638399061e129dcf61067f.tar.xz
cuberite-512b1a6b0e3d68c62f638399061e129dcf61067f.tar.zst
cuberite-512b1a6b0e3d68c62f638399061e129dcf61067f.zip
Diffstat (limited to 'src/Bindings/LuaState.h')
-rw-r--r--src/Bindings/LuaState.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Bindings/LuaState.h b/src/Bindings/LuaState.h
index 97e6b47e1..f68b022ea 100644
--- a/src/Bindings/LuaState.h
+++ b/src/Bindings/LuaState.h
@@ -59,6 +59,8 @@ class cTNTEntity;
class cHopperEntity;
class cBlockEntity;
class cBoundingBox;
+class cLuaTCPLink;
+class cLuaServerHandle;
typedef cBoundingBox * pBoundingBox;
typedef cWorld * pWorld;
@@ -83,6 +85,10 @@ public:
/** Creates a reference in the specified LuaState for object at the specified StackPos */
cRef(cLuaState & a_LuaState, int a_StackPos);
+
+ /** Moves the reference from the specified instance into a newly created instance.
+ The old instance is then "!IsValid()". */
+ cRef(cRef && a_FromRef);
~cRef();
@@ -202,6 +208,8 @@ public:
void Push(cHopperEntity * a_Hopper);
void Push(cItem * a_Item);
void Push(cItems * a_Items);
+ void Push(cLuaServerHandle * a_ServerHandle);
+ void Push(cLuaTCPLink * a_TCPLink);
void Push(cMonster * a_Monster);
void Push(cPickup * a_Pickup);
void Push(cPlayer * a_Player);
@@ -240,6 +248,9 @@ public:
/** Retrieve value at a_StackPos, if it is a valid cWorld class. If not, a_Value is unchanged */
void GetStackValue(int a_StackPos, pWorld & a_Value);
+
+ /** Store the value at a_StackPos as a reference. */
+ void GetStackValue(int a_StackPos, cRef & a_Ref);
/** Call the specified Lua function.
Returns true if call succeeded, false if there was an error.