changeset 113:7b0846025412

Fixed bug in checkAttributes that caused that values where not correctly set from the Template.
author KarstenBock@gmx.net
date Fri, 23 Sep 2011 14:43:06 +0200
parents c1a6ea47b838
children b10d12fbbb3f
files src/parpg/gamemodel.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/parpg/gamemodel.py	Fri Sep 23 14:24:22 2011 +0200
+++ b/src/parpg/gamemodel.py	Fri Sep 23 14:43:06 2011 +0200
@@ -108,8 +108,10 @@
         if self.object_db.has_key(template):
             db_attributes = deepcopy(self.object_db[template])
             for key in db_attributes.keys():
-                if attributes.has_key(key):
-                    attributes[key] = attributes[key] or db_attributes[key]
+                if attributes.has_key(key):                    
+                    tmp_attributes = db_attributes[key]
+                    tmp_attributes.update(attributes[key])
+                    attributes[key] = tmp_attributes
                 else:
                     attributes[key] = db_attributes[key]
         return attributes