Mercurial > parpg-source
comparison 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 |
comparison
equal
deleted
inserted
replaced
82:e864b704dd59 | 83:43e7a8d94446 |
---|---|
106 @param template: Template from which the values will be used | 106 @param template: Template from which the values will be used |
107 @return: The modified attributes""" | 107 @return: The modified attributes""" |
108 if self.object_db.has_key(template): | 108 if self.object_db.has_key(template): |
109 db_attributes = deepcopy(self.object_db[template]) | 109 db_attributes = deepcopy(self.object_db[template]) |
110 for key in db_attributes.keys(): | 110 for key in db_attributes.keys(): |
111 if attributes.has_key(key): | 111 if attributes.has_key(key): |
112 attributes[key] = attributes[key] or db_attributes[key] | 112 tmp_attributes = db_attributes[key] |
113 tmp_attributes.update(attributes[key]) | |
114 attributes[key] = tmp_attributes | |
113 else: | 115 else: |
114 attributes[key] = db_attributes[key] | 116 attributes[key] = db_attributes[key] |
115 return attributes | 117 return attributes |
116 | 118 |
117 def isIDUsed(self, ID): | 119 def isIDUsed(self, ID): |