Mercurial > parpg-source
changeset 91:d2451ecb1433
Added saveable_fields to FifeAgent component.
author | KarstenBock@gmx.net |
---|---|
date | Tue, 27 Sep 2011 15:38:24 +0200 |
parents | 4a8a0cd7f79a |
children | 84b5808d995c |
files | components/fifeagent.py |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/components/fifeagent.py Tue Sep 27 15:23:43 2011 +0200 +++ b/components/fifeagent.py Tue Sep 27 15:38:24 2011 +0200 @@ -11,8 +11,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. +from copy import deepcopy + from base import Base + class FifeAgent(Base): """Component that stores the values for a fife agent""" @@ -20,6 +23,13 @@ """Constructor""" Base.__init__(self, layer=object, behaviour=object, gfx=str) + @property + def saveable_fields(self): + fields = deepcopy(self.fields) + del fields["layer"] + del fields["behaviour"] + return fields + def setup_behaviour(agent): """Attach the behaviour to the layer"""