diff gamemodel.py @ 83:43e7a8d94446

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 a57ec730e753
children bb9e2f2548c6
line wrap: on
line diff
--- a/gamemodel.py	Fri Sep 23 14:24:22 2011 +0200
+++ b/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