home · contact · privacy
Add TERRAIN and PLAYER lines to curses client study view.
authorChristian Heller <c.heller@plomlompom.de>
Sun, 8 Nov 2020 02:39:28 +0000 (03:39 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Sun, 8 Nov 2020 02:39:28 +0000 (03:39 +0100)
new2/rogue_chat_curses.py

index 7030c296353332d30cc4cb4e032a6d38d9026687..ee2cae8f5abad5682ef5fa7e17a7cf15e8cfdf4a 100755 (executable)
@@ -394,10 +394,15 @@ class TUI:
         def draw_info():
             if not self.game.turn_complete:
                 return
         def draw_info():
             if not self.game.turn_complete:
                 return
+            pos_i = self.explorer.y * self.game.map_geometry.size.x + self.explorer.x
+            info = 'TERRAIN: %s\n' % self.game.map_content[pos_i]
+            for t in self.game.things:
+                if t.position == self.explorer:
+                    info += 'PLAYER @: %s\n' % t.name
             if self.explorer in self.game.portals:
             if self.explorer in self.game.portals:
-                info = 'PORTAL: ' + self.game.portals[self.explorer] + '\n'
+                info += 'PORTAL: ' + self.game.portals[self.explorer] + '\n'
             else:
             else:
-                info = 'PORTAL: (none)\n'
+                info += 'PORTAL: (none)\n'
             if self.explorer in self.game.info_db:
                 info += 'ANNOTATION: ' + self.game.info_db[self.explorer]
             else:
             if self.explorer in self.game.info_db:
                 info += 'ANNOTATION: ' + self.game.info_db[self.explorer]
             else: