From: Christian Heller Date: Thu, 19 Nov 2020 19:07:23 +0000 (+0100) Subject: In info view, show protection level. X-Git-Url: https://plomlompom.com/repos/%7B%7Bdb.prefix%7D%7D/%7B%7B%20web_path%20%7D%7D/static/blog?a=commitdiff_plain;h=d4419f2d3b883a20111d8258fb4f625094e9c587;p=plomrogue2 In info view, show protection level. --- 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]) {