From d4419f2d3b883a20111d8258fb4f625094e9c587 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Thu, 19 Nov 2020 20:07:23 +0100 Subject: [PATCH] In info view, show protection level. --- rogue_chat_curses.py | 4 ++++ rogue_chat_nocanvas_monochrome.html | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/rogue_chat_curses.py b/rogue_chat_curses.py index 54499da..99a7e88 100755 --- a/rogue_chat_curses.py +++ b/rogue_chat_curses.py @@ -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_, diff --git a/rogue_chat_nocanvas_monochrome.html b/rogue_chat_nocanvas_monochrome.html index 88b6672..b8d7b98 100644 --- a/rogue_chat_nocanvas_monochrome.html +++ b/rogue_chat_nocanvas_monochrome.html @@ -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]) { -- 2.30.2