summaryrefslogtreecommitdiff
path: root/asciifarm/client/commandhandler.py
diff options
context:
space:
mode:
authortroido <troido@protonmail.com>2020-03-06 10:47:17 +0100
committertroido <troido@protonmail.com>2020-03-06 10:47:17 +0100
commitc9366616079240cd7ee3d243c9f6897d40b4267d (patch)
treeda9ea3ad636d8173d0c568389114184a3eb413fd /asciifarm/client/commandhandler.py
parentdd3259e53edc119a8bd6d713cd49df240b19bff1 (diff)
parenteb029f8d0241449d64e237a1d689200a0a741b72 (diff)
Merge remote-tracking branch 'origin/ecs'
Diffstat (limited to 'asciifarm/client/commandhandler.py')
-rw-r--r--asciifarm/client/commandhandler.py15
1 files changed, 5 insertions, 10 deletions
diff --git a/asciifarm/client/commandhandler.py b/asciifarm/client/commandhandler.py
index 0c3027f..ec5baa3 100644
--- a/asciifarm/client/commandhandler.py
+++ b/asciifarm/client/commandhandler.py
@@ -29,7 +29,7 @@ class CommandHandler:
"selectitem": self.selectItem,
"inputwithselected": self.actWithSelected,
"use": self.useSelected,
- "unuse": self.unUseSelected,
+ "drop": self.dropSelected,
"take": self.takeSelected,
"eval": self.eval,
"exec": self.exec,
@@ -74,7 +74,7 @@ class CommandHandler:
self.input(["say", text])
def pick(self, option):
- self.input(["pick", option])
+ self.input(["interact", [None, "north", "south", "east", "west"], option])
def chat(self, text):
self.client.sendChat( text)
@@ -103,20 +103,15 @@ class CommandHandler:
menu = self.client.display.getSelectedMenu()
selected = self.client.display.getSelectedItem(menu)
if menu in ("inventory", "equipment"):
- action = "use"
+ self.input(["use", menu, selected])
elif menu == "ground":
- action = "interact",
- else:
- return
- self.input([action, selected])
+ self.input(["interact", selected])
- def unUseSelected(self):
+ def dropSelected(self):
menu = self.client.display.getSelectedMenu()
selected = self.client.display.getSelectedItem(menu)
if menu == "inventory":
action = "drop"
- elif menu == "equipment":
- action = "unequip"
else:
return
self.input([action, selected])