summaryrefslogtreecommitdiffstats
path: root/src/Bindings/LuaState.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-09-04 22:25:19 +0200
committerMattes D <github@xoft.cz>2014-09-04 22:25:19 +0200
commite9dda864eae043da5664a683ab08910c3081e571 (patch)
tree040923a3d26266e1ccbce3f3ee44079c511702b9 /src/Bindings/LuaState.h
parentMerge pull request #1371 from DayBr3ak/master (diff)
parentFixed compilation after chunk Y removal. (diff)
downloadcuberite-e9dda864eae043da5664a683ab08910c3081e571.tar
cuberite-e9dda864eae043da5664a683ab08910c3081e571.tar.gz
cuberite-e9dda864eae043da5664a683ab08910c3081e571.tar.bz2
cuberite-e9dda864eae043da5664a683ab08910c3081e571.tar.lz
cuberite-e9dda864eae043da5664a683ab08910c3081e571.tar.xz
cuberite-e9dda864eae043da5664a683ab08910c3081e571.tar.zst
cuberite-e9dda864eae043da5664a683ab08910c3081e571.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
*/