From ecfe6ab65bd1fc2c7f5733fe6ef4e6ddaac44a26 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sun, 23 Sep 2012 22:09:57 +0000 Subject: Source files cleanup: The rest of the files renamed. git-svn-id: http://mc-server.googlecode.com/svn/trunk@887 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/squirrelbindings/SquirrelBaseClass.h | 41 ++++++++++++++++++++++++++++ source/squirrelbindings/SquirrelBindings.cpp | 4 +-- source/squirrelbindings/cSquirrelBaseClass.h | 41 ---------------------------- 3 files changed, 43 insertions(+), 43 deletions(-) create mode 100644 source/squirrelbindings/SquirrelBaseClass.h delete mode 100644 source/squirrelbindings/cSquirrelBaseClass.h (limited to 'source/squirrelbindings') diff --git a/source/squirrelbindings/SquirrelBaseClass.h b/source/squirrelbindings/SquirrelBaseClass.h new file mode 100644 index 000000000..ef03c1a55 --- /dev/null +++ b/source/squirrelbindings/SquirrelBaseClass.h @@ -0,0 +1,41 @@ +#pragma once +#include "SquirrelBindings.h" +#include "../Plugin_Squirrel.h" +#include "../PluginManager.h" +#include "../Root.h" +#include "../SquirrelCommandBinder.h" + +//The baseclass for squirrel plugins +class cSquirrelBaseClass +{ +public: + cSquirrelBaseClass() + : m_Instance(0) + { + } + + void setInstance(cPlugin_Squirrel *a_Instance) + { + m_Instance = a_Instance; + } + + void AddHook(short a_Hook) + { + if(m_Instance) + cRoot::Get()->GetPluginManager()->AddHook(m_Instance, (cPluginManager::PluginHook) a_Hook); + } + + void AddCommand( std::string a_Command, std::string a_Description, std::string a_Permission ) + { + if(m_Instance) m_Instance->AddCommand(a_Command, a_Description, a_Permission); + } + + bool BindCommand( const std::string a_Command, const std::string a_Permission, Sqrat::Function a_Callback) + { + if(!m_Instance) return false; + return cRoot::Get()->GetPluginManager()->GetSquirrelCommandBinder()->BindCommand(a_Command, a_Permission, m_Instance, a_Callback); + } + +protected: + cPlugin_Squirrel *m_Instance; +}; \ No newline at end of file diff --git a/source/squirrelbindings/SquirrelBindings.cpp b/source/squirrelbindings/SquirrelBindings.cpp index 206d8bbcd..5c6b585f4 100644 --- a/source/squirrelbindings/SquirrelBindings.cpp +++ b/source/squirrelbindings/SquirrelBindings.cpp @@ -2,10 +2,10 @@ #include "SquirrelBindings.h" #include "SquirrelFunctions.h" -#include "cSquirrelBaseClass.h" +#include "SquirrelBaseClass.h" #include "SquirrelArray.h" -#include "../cPlayer.h" +#include "../Player.h" using namespace Sqrat; diff --git a/source/squirrelbindings/cSquirrelBaseClass.h b/source/squirrelbindings/cSquirrelBaseClass.h deleted file mode 100644 index 279c47027..000000000 --- a/source/squirrelbindings/cSquirrelBaseClass.h +++ /dev/null @@ -1,41 +0,0 @@ -#pragma once -#include "SquirrelBindings.h" -#include "../cPlugin_Squirrel.h" -#include "../cPluginManager.h" -#include "../cRoot.h" -#include "../cSquirrelCommandBinder.h" - -//The baseclass for squirrel plugins -class cSquirrelBaseClass -{ -public: - cSquirrelBaseClass() - : m_Instance(0) - { - } - - void setInstance(cPlugin_Squirrel *a_Instance) - { - m_Instance = a_Instance; - } - - void AddHook(short a_Hook) - { - if(m_Instance) - cRoot::Get()->GetPluginManager()->AddHook(m_Instance, (cPluginManager::PluginHook) a_Hook); - } - - void AddCommand( std::string a_Command, std::string a_Description, std::string a_Permission ) - { - if(m_Instance) m_Instance->AddCommand(a_Command, a_Description, a_Permission); - } - - bool BindCommand( const std::string a_Command, const std::string a_Permission, Sqrat::Function a_Callback) - { - if(!m_Instance) return false; - return cRoot::Get()->GetPluginManager()->GetSquirrelCommandBinder()->BindCommand(a_Command, a_Permission, m_Instance, a_Callback); - } - -protected: - cPlugin_Squirrel *m_Instance; -}; \ No newline at end of file -- cgit v1.2.3