I worked a little bit on the squirrel Bindings They work now on linux and windows :) (OSX is untested, but should work also) but they are very limited at the moment. (Only made OnChat working) I also fixed some small bugs. git-svn-id: http://mc-server.googlecode.com/svn/trunk@648 0a769ca7-a7f5-676a-18bf-c427514a06d6
29 lines
548 B
C++
29 lines
548 B
C++
#pragma once
|
|
#include "SquirrelBindings.h"
|
|
#include "../cPlugin_Squirrel.h"
|
|
#include "../cPluginManager.h"
|
|
#include "cRoot.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);
|
|
}
|
|
|
|
protected:
|
|
cPlugin_Squirrel *m_Instance;
|
|
}; |