diff options
author | Howaner <franzi.moos@googlemail.com> | 2014-09-12 19:13:46 +0200 |
---|---|---|
committer | Howaner <franzi.moos@googlemail.com> | 2014-09-12 19:13:46 +0200 |
commit | 1223a24d3c87832c08545e6f3e8e4c51ff1e7e3f (patch) | |
tree | f7cf72e49a7ca60d10af12ad9ff70910e089b028 /src/Bindings/LuaState.h | |
parent | Renamed SetWalkSpeed() to SetRelativeWalkSpeed() (diff) | |
parent | Fixed iron ore drop. (diff) | |
download | cuberite-1223a24d3c87832c08545e6f3e8e4c51ff1e7e3f.tar cuberite-1223a24d3c87832c08545e6f3e8e4c51ff1e7e3f.tar.gz cuberite-1223a24d3c87832c08545e6f3e8e4c51ff1e7e3f.tar.bz2 cuberite-1223a24d3c87832c08545e6f3e8e4c51ff1e7e3f.tar.lz cuberite-1223a24d3c87832c08545e6f3e8e4c51ff1e7e3f.tar.xz cuberite-1223a24d3c87832c08545e6f3e8e4c51ff1e7e3f.tar.zst cuberite-1223a24d3c87832c08545e6f3e8e4c51ff1e7e3f.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 */ |