Mercurial > parpg-source
comparison gamemodel.py @ 76:4cf150131139
Removed image field from the equipable component.
author | KarstenBock@gmx.net |
---|---|
date | Fri, 23 Sep 2011 12:58:32 +0200 |
parents | 9e03f7816061 |
children | a57ec730e753 |
comparison
equal
deleted
inserted
replaced
75:9e03f7816061 | 76:4cf150131139 |
---|---|
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"]) |