X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/static/gitweb.js?a=blobdiff_plain;f=rogue_chat.html;h=d86eec5ee65d4c3e06f43b55ac351a22cb13f225;hb=0d5dbd69d9e0fb1460a7663b24a6fba8f958ced5;hp=4285ded541ea1912fd83f36ba37337761407f074;hpb=aab94ffb12aa0dedc240d7b29001699b95c49249;p=plomrogue2 diff --git a/rogue_chat.html b/rogue_chat.html index 4285ded..d86eec5 100644 --- a/rogue_chat.html +++ b/rogue_chat.html @@ -794,15 +794,15 @@ let tui = { } this.draw_face = false; this.tile_draw = false; - if (mode_name == 'command_thing' && (!game.player.carrying - || !game.player.carrying.commandable)) { + if (mode_name == 'command_thing' && (!game.player.carrying + || !game.player.carrying.commandable)) { return fail('not carrying anything commandable', 'play'); - }; - if (mode_name == 'take_thing' && game.player.carrying) { + } else if (mode_name == 'take_thing' && game.player.carrying) { return fail('already carrying something', 'play'); - }; - if (mode_name == 'drop_thing' && !game.player.carrying) { + } else if (mode_name == 'drop_thing' && !game.player.carrying) { return fail('not carrying anything droppable', 'play'); + } else if (mode_name == 'enter_hat' && !game.player.hat) { + return fail('not wearing hat to edit', 'edit'); } if (mode_name == 'admin_enter' && this.is_admin) { mode_name = 'admin'; @@ -953,6 +953,10 @@ let tui = { if (t && t.protection) { this.inputEl.value = t.protection; } + } else if (this.mode.name == 'enter_face' && game.player.face) { + this.inputEl.value = game.player.face; + } else if (this.mode.name == 'enter_hat' && game.player.hat) { + this.inputEl.value = game.player.hat; } }, recalc_input_lines: function() {