コード例 #1
0
ファイル: Rooms.py プロジェクト: reem/commonplace
 def full_info(self):
     "Gives the full information about the room."
     result = self.entrance_info()
     if self.doors != {}:
         result += "\n\nDoors:\n{0}".format(base.format_objects(self.doors))
     if self.items != []:
         result += "\n\nItems:\n{0}".format(base.format_objects(self.items))
     if self.npcs != []:
         result += "\n\nCharacters:\n{0}".format(
             base.format_objects(self.npcs))
     if self.monsters != []:
         result += "\n\nMonsters:\n{0}".format(
             base.format_objects(self.monsters))
     return result
コード例 #2
0
ファイル: Rooms.py プロジェクト: reem/commonplace
    def full_info(self, poem=False):
        """
        Gives the full information about the room, for PoemRooms this
        is mostly for debugging.
        """

        result = self.entrance_info()
        if self.poem != '' and poem:
            result += "\n\nPoem:\n{0.poem}".format(self)
        if self.doors != {}:
            result += "\n\nDoors:\n{0}".format(base.format_objects(self.doors))
        if self.treasure is not None:
            result += "\n\nTreasure:\n{0}".format(
                base.format_objects(self.treasure))
        if self.guardian is not None:
            result += "\n\nGuardian:\n{0}".format(
                base.format_objects([self.guardian]))
        return result