This commit is contained in:
kepler155c
2018-10-24 08:24:44 -04:00
parent 27f38032ca
commit eb3cdad008
2 changed files with 23 additions and 2 deletions

View File

@@ -16,9 +16,20 @@ function ExportTask:cycle(context)
local slot = machine.getItemMeta(entry.slot) or { count = 0 }
local maxCount = slot.maxCount or itemDB:getMaxCount(entry.name)
local count = maxCount - slot.count
-- something else is in this slot
if slot.count > 0 and slot.name ~= entry.name then
count = 0
end
if count > 0 then
context.inventoryAdapter:provide(
itemDB:splitKey(entry.name), count, entry.slot, target)
local item = Milo:getItemWithQty(entry)
if item.count > 0 then
context.inventoryAdapter:provide(
itemDB:splitKey(entry.name),
math.min(count, item.count),
entry.slot,
target)
end
end
end
else

View File

@@ -81,6 +81,16 @@ local listingPage = UI.Page {
q = 'quit',
[ 'control-e' ] = 'eject',
[ 'control-s' ] = 'eject_stack',
[ 'control-1' ] = 'eject_1',
[ 'control-2' ] = 'eject_1',
[ 'control-3' ] = 'eject_1',
[ 'control-4' ] = 'eject_1',
[ 'control-5' ] = 'eject_1',
[ 'control-6' ] = 'eject_1',
[ 'control-7' ] = 'eject_1',
[ 'control-8' ] = 'eject_1',
[ 'control-9' ] = 'eject_1',
[ 'control-0' ] = 'eject_1',
[ 'control-m' ] = 'machines',
[ 'control-l' ] = 'resume',
},