diff options
author | Mattes D <github@xoft.cz> | 2015-01-30 21:24:02 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2015-02-04 08:40:52 +0100 |
commit | 014b96adb33fa902072d9f35661bc4f5e7c323e8 (patch) | |
tree | 46dcb57a65829d6364cbabec7add4021b9008ee6 /src/Bindings/LuaState.h | |
parent | cNetwork: Exported lookup functions to Lua API. (diff) | |
download | cuberite-014b96adb33fa902072d9f35661bc4f5e7c323e8.tar cuberite-014b96adb33fa902072d9f35661bc4f5e7c323e8.tar.gz cuberite-014b96adb33fa902072d9f35661bc4f5e7c323e8.tar.bz2 cuberite-014b96adb33fa902072d9f35661bc4f5e7c323e8.tar.lz cuberite-014b96adb33fa902072d9f35661bc4f5e7c323e8.tar.xz cuberite-014b96adb33fa902072d9f35661bc4f5e7c323e8.tar.zst cuberite-014b96adb33fa902072d9f35661bc4f5e7c323e8.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Bindings/LuaState.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Bindings/LuaState.h b/src/Bindings/LuaState.h index 0dcd248fe..f68b022ea 100644 --- a/src/Bindings/LuaState.h +++ b/src/Bindings/LuaState.h @@ -60,6 +60,7 @@ class cHopperEntity; class cBlockEntity; class cBoundingBox; class cLuaTCPLink; +class cLuaServerHandle; typedef cBoundingBox * pBoundingBox; typedef cWorld * pWorld; @@ -84,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(); @@ -203,6 +208,7 @@ 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); @@ -242,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. |