cyphesis/rulesets/PythonArithmeticScript.h
Al Riddoch 692aeda5af * client/Py_CreatorClient.h, rulesets/Py_BBox.h,
rulesets/Py_Location.h, rulesets/Py_Map.h, rulesets/Py_Mind.h,
	  rulesets/Py_Object.h, rulesets/Py_Operation.h, rulesets/Py_Oplist.h,
	  rulesets/Py_Point3D.h, rulesets/Py_Quaternion.h,
	  rulesets/Py_RootEntity.h, rulesets/Py_Task.h, rulesets/Py_Thing.h,
	  rulesets/Py_Vector3D.h, rulesets/Py_World.h, rulesets/Py_WorldTime.h:
	  Re-wrote PyFoo_Check macros to comply with recent conventions
	  and be a little more efficient.

	* rulesets/Py_Statistics.cpp, rulesets/PythonArithmeticScript.cpp,
	  rulesets/mason/world/statistics/Statistics.py: Remove lots of
	  debug output.

	* rulesets/PythonArithmeticScript.h: Add an accessor to get to the
	  python object.

	* rulesets/StatisticsProperty.h: Add an accessor to get to the
	  Statistics reference handled by this class.

	* rulesets/Py_Property.cpp: Return the script for a statistics
	  object rather than creating a wrapper for it.
2006-01-14 04:46:17 +00:00

25 lines
803 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) 2005 Alistair Riddoch
#ifndef RULESETS_PYTHON_ARITHMETIC_SCRIPT_H
#define RULESETS_PYTHON_ARITHMETIC_SCRIPT_H
#include "ArithmeticScript.h"
/// \brief Base class for script objects which handle statistics for entities.
///
/// This base class allows scripts to override attribute requests
class PythonArithmeticScript : public ArithmeticScript {
protected:
struct _object * m_script;
public:
PythonArithmeticScript(struct _object *);
virtual ~PythonArithmeticScript();
struct _object * script() const { return m_script; }
virtual int attribute(const std::string &, float &);
};
#endif // RULESETS_PYTHON_ARITHMETIC_SCRIPT_H