X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/edit?a=blobdiff_plain;f=rogue_chat_nocanvas_monochrome.html;h=644f567008e48bc85e00db3c2e90cc507934a1c9;hb=37041dbbc993a05466cf23233e42a8a02e81d751;hp=021ae85f9c6e39dd0cb46246e524a83a6aca4857;hpb=ec31980e8ff8d59b36add05f2e0e3d53e8325af6;p=plomrogue2 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') {