From 37041dbbc993a05466cf23233e42a8a02e81d751 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Thu, 19 Nov 2020 22:48:43 +0100 Subject: [PATCH] In web client, fix study mode explorer positioning bug. --- rogue_chat_nocanvas_monochrome.html | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/rogue_chat_nocanvas_monochrome.html b/rogue_chat_nocanvas_monochrome.html index 021ae85..644f567 100644 --- a/rogue_chat_nocanvas_monochrome.html +++ b/rogue_chat_nocanvas_monochrome.html @@ -412,13 +412,12 @@ let tui = { }, switch_mode: function(mode_name) { this.inputEl.focus(); - //this.show_help = false; this.map_mode = 'terrain'; + this.mode = this['mode_' + mode_name]; if (this.mode.shows_info && game.player_id in game.things) { explorer.position = game.things[game.player_id].position; explorer.query_info(); } - this.mode = this['mode_' + mode_name]; this.empty_input(); this.restore_input_values(); document.getElementById("take_thing").disabled = true; @@ -456,13 +455,13 @@ let tui = { document.getElementById("move_down").disabled = false; } } - if (!this.mode.is_intro && this.mode != this.mode_play) { + if (!this.mode.is_intro && this.mode.name != 'play') { document.getElementById("switch_to_play").disabled = false; } - if (!this.mode.is_intro && this.mode != this.mode_study) { + if (!this.mode.is_intro && this.mode.name != 'study') { document.getElementById("switch_to_study").disabled = false; } - if (!this.mode.is_intro && this.mode != this.mode_chat) { + if (!this.mode.is_intro && this.mode.name != 'chat') { document.getElementById("switch_to_chat").disabled = false; } if (this.mode.name == 'login') { -- 2.30.2