| 1 |
#ifndef HEADER_SCRIPTAGENT_H |
| 2 |
#define HEADER_SCRIPTAGENT_H |
| 3 |
|
| 4 |
class Path; |
| 5 |
class ScriptState; |
| 6 |
|
| 7 |
#include "BaseAgent.h" |
| 8 |
#include "Name.h" |
| 9 |
#include "Scripter.h" |
| 10 |
|
| 11 |
#include <string> |
| 12 |
|
| 13 |
extern "C" { |
| 14 |
#include "lua.h" |
| 15 |
} |
| 16 |
|
| 17 |
/** |
| 18 |
* Global scripting. |
| 19 |
* It is used by OptionAgent and debug console. |
| 20 |
*/ |
| 21 |
class ScriptAgent : public BaseAgent, public Scripter { |
| 22 |
AGENT(ScriptAgent, Name::SCRIPT_NAME); |
| 23 |
protected: |
| 24 |
virtual void own_init(); |
| 25 |
public: |
| 26 |
void registerFunc(const char *name, lua_CFunction func); |
| 27 |
|
| 28 |
virtual void receiveString(const StringMsg *msg); |
| 29 |
}; |
| 30 |
|
| 31 |
#endif |