From: Christian Heller Date: Thu, 19 Nov 2020 21:48:43 +0000 (+0100) Subject: In web client, fix study mode explorer positioning bug. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/static/task?a=commitdiff_plain;h=37041dbbc993a05466cf23233e42a8a02e81d751;p=plomrogue2 In web client, fix study mode explorer positioning bug. --- 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') {