diff options
author | Mattes D <github@xoft.cz> | 2014-09-04 22:25:19 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-09-04 22:25:19 +0200 |
commit | e9dda864eae043da5664a683ab08910c3081e571 (patch) | |
tree | 040923a3d26266e1ccbce3f3ee44079c511702b9 /src/Bindings/LuaState.h | |
parent | Merge pull request #1371 from DayBr3ak/master (diff) | |
parent | Fixed compilation after chunk Y removal. (diff) | |
download | cuberite-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 '')
-rw-r--r-- | src/Bindings/LuaState.h | 18 |
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 */ |