home · contact · privacy
In info view, show protection level.
authorChristian Heller <c.heller@plomlompom.de>
Thu, 19 Nov 2020 19:07:23 +0000 (20:07 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Thu, 19 Nov 2020 19:07:23 +0000 (20:07 +0100)
rogue_chat_curses.py
rogue_chat_nocanvas_monochrome.html

index 54499daf2551ac335dc93ff9f274d1dcc09bd136..99a7e88bc94b0f0bccf81c0bd3228335226765fe 100755 (executable)
@@ -463,6 +463,10 @@ class TUI:
                 if terrain_char in self.game.terrains:
                     terrain_desc = self.game.terrains[terrain_char]
                 info = 'TERRAIN: "%s" / %s\n' % (terrain_char, terrain_desc)
+                protection = self.game.map_control_content[pos_i]
+                if protection == '.':
+                    protection = 'unprotected'
+                info = 'PROTECTION: %s\n' % protection
                 for t in self.game.things:
                     if t.position == self.explorer:
                         info += 'THING: %s / %s' % (t.type_,
index 88b66723d9ee6f5f54aa2a06dada0214f22a80f4..b8d7b986d11c1350bf203f5a8f380bc4b1298816 100644 (file)
@@ -825,6 +825,11 @@ let explorer = {
             terrain_desc = game.terrains[terrain_char];
         };
         info += 'TERRAIN: "' + terrain_char + '" / ' + terrain_desc + "\n";
+        let protection = game.map_control[position_i];
+        if (protection == '.') {
+            protection = 'unprotected';
+        };
+        info += 'PROTECTION: ' + protection + '\n';
         for (let t_id in game.things) {
              let t = game.things[t_id];
              if (t.position[0] == this.position[0] && t.position[1] == this.position[1]) {