summaryrefslogtreecommitdiffstats
path: root/src/Bindings/LuaState.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Bindings/LuaState.h')
-rw-r--r--src/Bindings/LuaState.h24
1 files changed, 22 insertions, 2 deletions
diff --git a/src/Bindings/LuaState.h b/src/Bindings/LuaState.h
index afac77ce8..ef87c3efc 100644
--- a/src/Bindings/LuaState.h
+++ b/src/Bindings/LuaState.h
@@ -56,9 +56,12 @@ struct HTTPRequest;
class cWebAdmin;
struct HTTPTemplateRequest;
class cTNTEntity;
-class cCreeper;
class cHopperEntity;
class cBlockEntity;
+class cBoundingBox;
+
+typedef cBoundingBox * pBoundingBox;
+typedef cWorld * pWorld;
@@ -186,6 +189,9 @@ public:
void Push(const HTTPRequest * a_Request);
void Push(const HTTPTemplateRequest * a_Request);
void Push(const Vector3d & a_Vector);
+ void Push(const Vector3d * a_Vector);
+ void Push(const Vector3i & a_Vector);
+ void Push(const Vector3i * a_Vector);
// Push a value onto the stack (keep alpha-sorted):
void Push(bool a_Value);
@@ -227,6 +233,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:
@@ -292,7 +304,7 @@ public:
void ToString(int a_StackPos, AString & a_String);
/** Logs all the elements' types on the API stack, with an optional header for the listing. */
- void LogStack(const char * a_Header);
+ void LogStack(const char * a_Header = NULL);
/** Logs all the elements' types on the API stack, with an optional header for the listing. */
static void LogStack(lua_State * a_LuaState, const char * a_Header = NULL);
@@ -325,6 +337,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
*/