plethora autocrafting wip

This commit is contained in:
kepler155c
2018-10-21 00:38:24 -04:00
parent d5c102054a
commit 782850b94d
2 changed files with 14 additions and 0 deletions

View File

@@ -949,6 +949,8 @@ local listingPage = UI.Page {
r = 'refresh',
q = 'quit',
grid_select_right = 'craft',
[ 'control-e' ] = 'eject',
[ 'control-s' ] = 'eject_stack',
},
displayMode = 0,
}
@@ -983,6 +985,18 @@ function listingPage:eventHandler(event)
if event.type == 'quit' then
UI:exitPullEvents()
elseif event.type == 'eject' then
local item = self.grid:getSelected()
if item then
eject(item, 1)
end
elseif event.type == 'eject_stack' then
local item = self.grid:getSelected()
if item then
eject(item, itemDB:getMaxCount(item))
end
elseif event.type == 'grid_select' then
local selected = event.selected
UI:setPage('item', selected)