milo tweaks
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
local Config = require('config')
|
||||
local Craft = require('craft2')
|
||||
local itemDB = require('itemDB')
|
||||
local Sound = require('sound')
|
||||
local Util = require('util')
|
||||
|
||||
local os = _G.os
|
||||
@@ -228,6 +229,7 @@ end
|
||||
|
||||
function Milo:eject(item, count)
|
||||
count = self.context.storage:export(self.context.turtleInventory, nil, count, item)
|
||||
Sound.play('ui.button.click')
|
||||
turtle.emptyInventory()
|
||||
return count
|
||||
end
|
||||
|
||||
@@ -157,5 +157,10 @@ Event.on('turtle_inventory', function()
|
||||
print('idle')
|
||||
end)
|
||||
|
||||
Event.onInterval(5, function()
|
||||
-- for some reason, it keeps stalling ...
|
||||
os.queueEvent('turtle_inventory')
|
||||
end)
|
||||
|
||||
os.queueEvent('turtle_inventory')
|
||||
Event.pullEvents()
|
||||
|
||||
@@ -178,7 +178,6 @@ function page:eject(amount)
|
||||
item.count = request.current - request.count
|
||||
if request.count + request.craft > 0 then
|
||||
self.grid:draw()
|
||||
Sound.play('ui.button.click')
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user