From 5456d88241c1ede82de12c069bbe7dcd93c6aa39 Mon Sep 17 00:00:00 2001 From: Christian Heller <c.heller@plomlompom.de> Date: Fri, 6 Nov 2020 04:13:50 +0100 Subject: [PATCH] Widen Square view, too. --- new2/rogue_chat_curses.py | 5 ++--- new2/rogue_chat_nocanvas_monochrome.html | 8 +++----- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/new2/rogue_chat_curses.py b/new2/rogue_chat_curses.py index 1ae5fa2..9eb99c8 100755 --- a/new2/rogue_chat_curses.py +++ b/new2/rogue_chat_curses.py @@ -384,15 +384,14 @@ class TUI: indent = 0 if indent else 1 else: for line in map_lines_split: - map_lines += [''.join(line)] + map_lines += [' '.join(line)] window_center = YX(int(self.size.y / 2), int(self.window_width / 2)) player = self.game.get_thing(self.game.player_id, False) center = player.position if self.mode.shows_info: center = self.explorer - if type(self.game.map_geometry) == MapGeometryHex: - center = YX(center.y, center.x * 2) + center = YX(center.y, center.x * 2) offset = center - window_center if type(self.game.map_geometry) == MapGeometryHex and offset.y % 2: offset += YX(0, 1) diff --git a/new2/rogue_chat_nocanvas_monochrome.html b/new2/rogue_chat_nocanvas_monochrome.html index 16fd834..e983c35 100644 --- a/new2/rogue_chat_nocanvas_monochrome.html +++ b/new2/rogue_chat_nocanvas_monochrome.html @@ -8,7 +8,7 @@ movement: <select id="movement_keys" name="movement_keys" > <option value="alphabetic" selected>w/a/s/d (square grid) or e,d,c,x,s,w (hex grid)</option> <option value="arrow_or_numpad">arrow keys (square grid) or numpad (hex grid)</option> </select> -rows: <input id="n_rows" type="number" step=4 min=10 value=24 /> +rows: <input id="n_rows" type="number" step=4 min=8 value=24 /> cols: <input id="n_cols" type="number" step=4 min=20 value=80 /> command character: <select id="command_char"" > <option value=":" selected>:</option> @@ -440,7 +440,7 @@ let tui = { let map_lines = [] if (game.map_geometry == 'Square') { for (let line_split of map_lines_split) { - map_lines.push(line_split.join('')); + map_lines.push(line_split.join(' ')); }; } else if (game.map_geometry == 'Hex') { let indent = 0 @@ -459,9 +459,7 @@ let tui = { if (tui.mode.shows_info) { center_position = [explorer.position[0], explorer.position[1]]; } - if (game.map_geometry == 'Hex') { - center_position[1] = center_position[1] * 2; - }; + center_position[1] = center_position[1] * 2; let offset = [center_position[0] - window_center[0], center_position[1] - window_center[1]] if (game.map_geometry == 'Hex' && offset[0] % 2) { -- 2.30.2