From: Christian Heller Date: Tue, 27 Oct 2020 01:08:01 +0000 (+0100) Subject: Allow space char for TASK:WRITE. X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/decks/static/todo?a=commitdiff_plain;h=9209d0e0f1bbc79f872ce3b2bd353f1307a7c84d;p=plomrogue2-experiments Allow space char for TASK:WRITE. --- diff --git a/new2/plomrogue/game.py b/new2/plomrogue/game.py index 52e0d60..8fb2644 100755 --- a/new2/plomrogue/game.py +++ b/new2/plomrogue/game.py @@ -71,7 +71,7 @@ class Game(GameBase): return self.map_geometry.get_directions() if string_option_type == 'char': return [c for c in - string.digits + string.ascii_letters + string.punctuation] + string.digits + string.ascii_letters + string.punctuation + ' '] return None def send_gamestate(self, connection_id=None): diff --git a/new2/rogue_chat_nocanvas_monochrome.html b/new2/rogue_chat_nocanvas_monochrome.html index fee0aa9..b49aac4 100644 --- a/new2/rogue_chat_nocanvas_monochrome.html +++ b/new2/rogue_chat_nocanvas_monochrome.html @@ -327,7 +327,7 @@ document.addEventListener('keydown', (event) => { }; } else if (mode == 'edit') { if (event.key.length === 1) { - websocket.send("TASK:WRITE " + event.key); + websocket.send("TASK:WRITE " + quote(event.key)); } mode = 'game'; }