mirror of
https://github.com/worldforge/cyphesis
synced 2026-08-13 12:26:04 -04:00
* server/TaskFactory.cpp, server/TaskFactory.h: Re-write the script task to handle creating the script directly, rather than use ScriptFactory which is not suitable. * rulesets/PythonMindScript.cpp, rulesets/PythonScript.cpp, rulesets/PythonScript.h, PythonThingScript.cpp, rulesets/PythonThingScript.h, rulesets/Python_API.cpp, server/ScriptFactory.cpp: Remove obsolete pointer to entity from script class, removing its link to Entity, making it more generally useful.
28 lines
839 B
C++
28 lines
839 B
C++
// This file may be redistributed and modified only under the terms of
|
|
// the GNU General Public License (See COPYING for details).
|
|
// Copyright (C) 2001 Alistair Riddoch
|
|
|
|
#ifndef RULESETS_PYTHON_SCRIPT_H
|
|
#define RULESETS_PYTHON_SCRIPT_H
|
|
|
|
#include <Python.h>
|
|
|
|
#include "Script.h"
|
|
|
|
class Entity;
|
|
|
|
/// \brief Base Script class for Python scripts
|
|
class PythonScript : public Script {
|
|
protected:
|
|
PyObject * scriptObject;
|
|
public:
|
|
PythonScript(PyObject *);
|
|
virtual ~PythonScript();
|
|
virtual bool operation(const std::string &,
|
|
const Atlas::Objects::Operation::RootOperation &,
|
|
OpVector &,
|
|
const Atlas::Objects::Operation::RootOperation * = 0) = 0;
|
|
virtual void hook(const std::string &, Entity *) = 0;
|
|
};
|
|
|
|
#endif // RULESETS_PYTHON_SCRIPT_H
|