def getDescription(self, isLooking=False): description = GameEntity.getDescription(self, isLooking=isLooking) for slot in self.inventory.slots.values(): for entity in slot.values(): if not entity.displayAutomatically: continue entityDescription = entity.getDescription(isLooking=isLooking) if entityDescription is not None: if description: description = '%s\n%s' % (description, entityDescription) else: description = entityDescription return description
def getDescription(self, isLooking=False): description = GameEntity.getDescription(self, isLooking=isLooking) for slotKey in self.inventory.slots.keys(): inventoryDescription = self.getDescriptionOfContents( inventory=self.inventory, slotKey=slotKey) if inventoryDescription is not None: description = '%s\n%s' % (description, inventoryDescription) if self.attachedTo: description = '%s Attached to %s is %s' %\ (description, self.getDisplayNameWithDefiniteArticle(), self.getListOfAttachedEntities()) return description