cyphesis/rulesets/basic/world/objects/Thing.py
Al Riddoch a9e1d4993c 2005-12-05 Al Riddoch <alriddoch@zepler.org>
* rulesets/basic/mind/NPCMind.py,
	  rulesets/basic/world/objects/Thing.py: Move some functionality
	  from the Thing base class into NPCMind, leaving minimal
	  functionality in the base class making it suitable as an interface
	  for all scripts.
2005-12-05 21:40:45 +00:00

18 lines
742 B
Python

#This file is distributed under the terms of the GNU General Public license.
#Copyright (C) 1999-2005 Al Riddoch (See the file COPYING for details).
class Thing:
"""This is the interface class for all entity and mind scripts. It
provides the interface to the object in the server core."""
def __init__(self, cppthing):
#print "Thing.__init__"
self.cinit(cppthing)
def cinit(self, cppthing):
self.__dict__['cppthing'] = cppthing
def __getattr__(self, name):
value = getattr(self.cppthing, name)
#print "__getattr__",name,value
return value
def __setattr__(self, name, value):
#print "__setattr__",name,value
return setattr(self.cppthing, name, value)