summaryrefslogtreecommitdiff
path: root/asciifarmclient/commandhandler.py
diff options
context:
space:
mode:
authortroido <troido@protonmail.com>2020-04-05 13:15:55 +0200
committertroido <troido@protonmail.com>2020-04-05 13:15:55 +0200
commitb0980b660caa822f2e7654dfdd4f514e0c1b63a3 (patch)
treeadafb86ba628f50511d494a7fc4ca47281f0dde0 /asciifarmclient/commandhandler.py
parentb6910ef70d25898ffb787181a6d486283094068a (diff)
added interact command
Diffstat (limited to 'asciifarmclient/commandhandler.py')
-rw-r--r--asciifarmclient/commandhandler.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/asciifarmclient/commandhandler.py b/asciifarmclient/commandhandler.py
index ec5baa3..99d8b5a 100644
--- a/asciifarmclient/commandhandler.py
+++ b/asciifarmclient/commandhandler.py
@@ -38,7 +38,9 @@ class CommandHandler:
"j": self.json,
"ijson": self.ijson,
"ij": self.ijson,
- "hy": self.hy
+ "hy": self.hy,
+ "interact": self.interact,
+ "q": self.interact
}
self.evalArgs = {
@@ -147,4 +149,6 @@ class CommandHandler:
def ijson(self, text):
self.input(json.loads(text))
+ def interact(self, arg):
+ self.input(["interact", [None, "north", "south", "east", "west"], arg])