Mercurial > parpg-source
changeset 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 | e864b704dd59 |
children | bb9e2f2548c6 |
files | gamemodel.py |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
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