changeset 127:90b49fda0340

saveable_fields property of components is now a List.
author KarstenBock@gmx.net
date Tue, 27 Sep 2011 16:27:36 +0200
parents 0ab8b61a8a56
children 2a661e259b8b
files src/parpg/components/base.py src/parpg/components/containable.py src/parpg/components/container.py src/parpg/components/dialogue.py src/parpg/components/equip.py src/parpg/components/equipable.py src/parpg/components/fifeagent.py
diffstat 7 files changed, 13 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/src/parpg/components/base.py	Tue Sep 27 16:05:07 2011 +0200
+++ b/src/parpg/components/base.py	Tue Sep 27 16:27:36 2011 +0200
@@ -18,4 +18,4 @@
     
     @property
     def saveable_fields(self):
-        return self.fields
\ No newline at end of file
+        return self.fields.keys()
\ No newline at end of file
--- a/src/parpg/components/containable.py	Tue Sep 27 16:05:07 2011 +0200
+++ b/src/parpg/components/containable.py	Tue Sep 27 16:27:36 2011 +0200
@@ -24,6 +24,6 @@
 
     @property
     def saveable_fields(self):
-        fields = deepcopy(self.fields)
-        del fields["container"]
+        fields = self.fields.keys()
+        fields.remove("container")
         return fields
\ No newline at end of file
--- a/src/parpg/components/container.py	Tue Sep 27 16:05:07 2011 +0200
+++ b/src/parpg/components/container.py	Tue Sep 27 16:27:36 2011 +0200
@@ -25,8 +25,8 @@
 
     @property
     def saveable_fields(self):
-        fields = deepcopy(self.fields)
-        del fields["children"]
+        fields = self.fields.keys()
+        fields.remove("children")
         return fields
 
 
--- a/src/parpg/components/dialogue.py	Tue Sep 27 16:05:07 2011 +0200
+++ b/src/parpg/components/dialogue.py	Tue Sep 27 16:27:36 2011 +0200
@@ -24,6 +24,6 @@
 
     @property
     def saveable_fields(self):
-        fields = deepcopy(self.fields)
-        del fields["dialogue"]
+        fields = self.fields.keys()
+        fields.remove("dialogue")
         return fields
\ No newline at end of file
--- a/src/parpg/components/equip.py	Tue Sep 27 16:05:07 2011 +0200
+++ b/src/parpg/components/equip.py	Tue Sep 27 16:27:36 2011 +0200
@@ -23,7 +23,7 @@
 
     @property
     def saveable_fields(self):
-        return {}
+        return []
 
 class SlotInvalidError(Exception):
     """Error that gets raised when the slot is invalid."""
--- a/src/parpg/components/equipable.py	Tue Sep 27 16:05:07 2011 +0200
+++ b/src/parpg/components/equipable.py	Tue Sep 27 16:27:36 2011 +0200
@@ -25,6 +25,6 @@
         
     @property
     def saveable_fields(self):
-        fields = deepcopy(self.fields)
-        del fields["wearer"]
+        fields = self.fields.keys()
+        fields.remove("wearer")
         return fields
\ No newline at end of file
--- a/src/parpg/components/fifeagent.py	Tue Sep 27 16:05:07 2011 +0200
+++ b/src/parpg/components/fifeagent.py	Tue Sep 27 16:27:36 2011 +0200
@@ -25,9 +25,9 @@
 
     @property
     def saveable_fields(self):
-        fields = deepcopy(self.fields)
-        del fields["layer"]
-        del fields["behaviour"]
+        fields = self.fields.keys()
+        fields.remove("layer")
+        fields.remove("behaviour")
         return fields