From 273ddcbfff87676d10c04e90ba98a74035d9d30a Mon Sep 17 00:00:00 2001 From: "lapayo94@gmail.com" Date: Tue, 10 Jul 2012 16:46:15 +0000 Subject: Fixed some bugs within the squirrel plugin system. Implemented feature request www.mc-server.org/support/index.php?do=details&task_id=53 git-svn-id: http://mc-server.googlecode.com/svn/trunk@655 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/squirrelbindings/SquirrelObject.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'source/squirrelbindings/SquirrelObject.h') diff --git a/source/squirrelbindings/SquirrelObject.h b/source/squirrelbindings/SquirrelObject.h index 1ac6fa105..547dd4e02 100644 --- a/source/squirrelbindings/SquirrelObject.h +++ b/source/squirrelbindings/SquirrelObject.h @@ -9,15 +9,20 @@ public: m_SquirrelObject = a_Obj; } - Sqrat::Function GetFunction(const char *methodName) + Sqrat::Function GetFunction(const char *a_MethodName) { if(m_SquirrelObject.IsNull()) return Sqrat::Function(); - Sqrat::Function method(m_SquirrelObject, methodName); + Sqrat::Function method(m_SquirrelObject, a_MethodName); return method; } + bool HasFunction(const char *a_MethodName) + { + return !this->GetFunction(a_MethodName).IsNull(); + } + protected: Sqrat::Object m_SquirrelObject; -- cgit v1.2.3