summaryrefslogtreecommitdiffstats
path: root/src/Bindings/LuaState.h
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-09-23 14:39:49 +0200
committerHowaner <franzi.moos@googlemail.com>2014-09-23 14:39:49 +0200
commit4b38e077cf8d27d1c7ef26d4148f7825c5aeaabd (patch)
treecd86062eb50ba870f73b6f29dec0205f87205bf8 /src/Bindings/LuaState.h
parentMerge branch 'master' into EntityCustomName (diff)
parentQtBiomeVisualiser: Fixed confusion about Globals.h. (diff)
downloadcuberite-4b38e077cf8d27d1c7ef26d4148f7825c5aeaabd.tar
cuberite-4b38e077cf8d27d1c7ef26d4148f7825c5aeaabd.tar.gz
cuberite-4b38e077cf8d27d1c7ef26d4148f7825c5aeaabd.tar.bz2
cuberite-4b38e077cf8d27d1c7ef26d4148f7825c5aeaabd.tar.lz
cuberite-4b38e077cf8d27d1c7ef26d4148f7825c5aeaabd.tar.xz
cuberite-4b38e077cf8d27d1c7ef26d4148f7825c5aeaabd.tar.zst
cuberite-4b38e077cf8d27d1c7ef26d4148f7825c5aeaabd.zip
Diffstat (limited to 'src/Bindings/LuaState.h')
-rw-r--r--src/Bindings/LuaState.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/Bindings/LuaState.h b/src/Bindings/LuaState.h
index eeb93fd4d..44f187701 100644
--- a/src/Bindings/LuaState.h
+++ b/src/Bindings/LuaState.h
@@ -59,6 +59,10 @@ class cTNTEntity;
class cCreeper;
class cHopperEntity;
class cBlockEntity;
+class cBoundingBox;
+
+typedef cBoundingBox * pBoundingBox;
+typedef cWorld * pWorld;
@@ -230,6 +234,12 @@ public:
/** Retrieve value at a_StackPos, if it is a valid number, converting and clamping it to eWeather.
If not, a_Value is unchanged. */
void GetStackValue(int a_StackPos, eWeather & a_Value);
+
+ /** Retrieve value at a_StackPos, if it is a valid cBoundingBox class. If not, a_Value is unchanged */
+ void GetStackValue(int a_StackPos, pBoundingBox & a_Value);
+
+ /** 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);
// Include the cLuaState::Call() overload implementation that is generated by the gen_LuaState_Call.lua script:
@@ -328,6 +338,14 @@ protected:
*/
bool PushFunction(int a_FnRef);
+ /** Pushes a function that has been saved as a reference.
+ Returns true if successful. Logs a warning on failure
+ */
+ bool PushFunction(const cRef & a_FnRef)
+ {
+ return PushFunction((int)a_FnRef);
+ }
+
/** Pushes a function that is stored in a referenced table by name
Returns true if successful. Logs a warning on failure
*/