Mercurial > parpg-core
comparison src/parpg/gamemodel.py @ 106:f3ace79da781
Removed image field from the equipable component.
author | KarstenBock@gmx.net |
---|---|
date | Fri, 23 Sep 2011 12:58:32 +0200 |
parents | 7829eb185d6f |
children | 2f928c913c78 |
comparison
equal
deleted
inserted
replaced
105:7829eb185d6f | 106:f3ace79da781 |
---|---|
456 if agent.has_key("Equipment"): | 456 if agent.has_key("Equipment"): |
457 for slot, data in agent["Equipment"].iteritems(): | 457 for slot, data in agent["Equipment"].iteritems(): |
458 item_data = {} | 458 item_data = {} |
459 item_data = self.checkAttributes(item_data, data["type"]) | 459 item_data = self.checkAttributes(item_data, data["type"]) |
460 if item_data.has_key("containable") and item_data.has_key("equipable"): | 460 if item_data.has_key("containable") and item_data.has_key("equipable"): |
461 if not item_data["equipable"].has_key("image"): | |
462 item_data["equipable"]["image"]=item_data["containable"]["image"] | |
463 if not item_data["containable"].has_key("image"): | |
464 item_data["containable"]["image"]=item_data["equipable"]["image"] | |
465 item = createEntity(item_data, world, None) | 461 item = createEntity(item_data, world, None) |
466 self.game_state.addObject(self.createUniqueID(data["ID"]), None, item) | 462 self.game_state.addObject(self.createUniqueID(data["ID"]), None, item) |
467 equip.equip(obj.equip, item.equipable, slot) | 463 equip.equip(obj.equip, item.equipable, slot) |
468 else: | 464 else: |
469 raise Exception("Item %s is not containable or equipable." % data["type"]) | 465 raise Exception("Item %s is not containable or equipable." % data["type"]) |