comparison gamemodel.py @ 89:939984cff702

Added Base component, which has a saveable_fields property. It is supposed to be derived from, thus it is not in the components list.
author KarstenBock@gmx.net
date Tue, 27 Sep 2011 14:58:03 +0200
parents 0411a4bcceee
children 4a8a0cd7f79a
comparison
equal deleted inserted replaced
88:0411a4bcceee 89:939984cff702
692 elif name == "equip": 692 elif name == "equip":
693 #TODO: Save Equipment 693 #TODO: Save Equipment
694 pass 694 pass
695 else: 695 else:
696 comp_vals = getattr(entity, name) 696 comp_vals = getattr(entity, name)
697 for field in component.fields: 697 for field in component.saveable_fields:
698 try: 698 try:
699 comp_data[field] = getattr(comp_vals, field) 699 comp_data[field] = getattr(comp_vals, field)
700 except AttributeError: 700 except AttributeError:
701 #The entity doesn't have this specific value, 701 #The entity doesn't have this specific value,
702 #ignore it 702 #ignore it