Add inventory controls and enhance dashboard
This commit is contained in:
+7
-9
@@ -67,8 +67,7 @@ class Commands:
|
||||
|
||||
unsupported = {
|
||||
'gather', 'trade', 'gapple', 'fill',
|
||||
'drop', 'dump', 'break', 'open', 'click', 'use',
|
||||
'interact',
|
||||
'break', 'open', 'click', 'use', 'interact',
|
||||
}
|
||||
if (command in unsupported or
|
||||
(command == 'farm' and not data.lower().startswith('crop'))):
|
||||
@@ -471,7 +470,7 @@ class Commands:
|
||||
|
||||
## 1drop - drops the current stack its holding
|
||||
if command == 'drop':
|
||||
self.g.game.drop_stack()
|
||||
reply = 'ok' if self.g.game.drop_stack() else 'empty or busy'
|
||||
|
||||
## 1select [id] - moves item with id into main hand
|
||||
if command == 'select' and data:
|
||||
@@ -484,16 +483,15 @@ class Commands:
|
||||
## 1dump [id] - drops all items matching id
|
||||
if command == 'dump' and data:
|
||||
item = int(data)
|
||||
if self.g.game.count_items([item]):
|
||||
self.g.dumping = item
|
||||
reply = 'ok'
|
||||
else:
|
||||
reply = 'not found'
|
||||
count = self.g.game.start_dump(item)
|
||||
reply = ('busy' if count is None else
|
||||
'ok' if count else 'not found')
|
||||
|
||||
## 1drain - drops all items in inventory
|
||||
if command == 'drain':
|
||||
count = self.g.game.start_drain()
|
||||
reply = 'ok' if count else 'empty'
|
||||
reply = ('busy' if count is None else
|
||||
'ok' if count else 'empty')
|
||||
|
||||
if command == 'gapple':
|
||||
self.g.job.state = self.g.job.find_gapple
|
||||
|
||||
Reference in New Issue
Block a user