changeset 121:24edf5d53083

Added saveable_fields to FifeAgent component.
author KarstenBock@gmx.net
date Tue, 27 Sep 2011 15:38:24 +0200
parents 1703dbb4fefb
children 21dd4da40eab
files src/parpg/components/fifeagent.py
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/parpg/components/fifeagent.py	Tue Sep 27 15:23:43 2011 +0200
+++ b/src/parpg/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"""