예제 #1
0
 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
예제 #2
0
파일: item.py 프로젝트: krieghan/spelunker
 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