diff options
| author | troido <troido@hotmail.com> | 2017-12-30 15:35:38 +0100 |
|---|---|---|
| committer | troido <troido@hotmail.com> | 2017-12-30 15:35:38 +0100 |
| commit | f62cb51a6b69abb48b76db8b3166f94bcfe66ba2 (patch) | |
| tree | 4cfa8355f28bca01334c6f1432a740a979bbd2cf /asciifarm/client/gameclient.py | |
| parent | 705bc3ea52c52f13bddf0946bdb77a5a3fef77c6 (diff) | |
keybinding docs now in keybindings file
Diffstat (limited to 'asciifarm/client/gameclient.py')
| -rw-r--r-- | asciifarm/client/gameclient.py | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/asciifarm/client/gameclient.py b/asciifarm/client/gameclient.py index 565262d..9ba4b37 100644 --- a/asciifarm/client/gameclient.py +++ b/asciifarm/client/gameclient.py @@ -25,22 +25,14 @@ class Client: self.connection = connection self.logFile = logFile - self.commands = importlib.import_module(".keybindings", __package__).commands - self.controlsString = """\ -Default Controls: - wasd or arrows: - Move around - e: Grab - q: Drop - E: Use - r: Interact - f: Attack - t: Chat""" + keymodule = importlib.import_module(".keybindings", __package__) + self.commands = keymodule.commands + self.controlsString = keymodule.docs self.display.showInfo(self.controlsString) - + def send(self, data): self.connection.send(json.dumps(data)) @@ -57,7 +49,6 @@ Default Controls: threading.Thread(target=self.listen, daemon=True).start() self.connection.send(json.dumps(["name", self.name])) self.command_loop() - def listen(self): self.connection.listen(self.update, self.close) |
