package management

This commit is contained in:
kepler155c
2018-11-03 18:14:11 -04:00
parent aa66b1c663
commit 1f7ef4a483
124 changed files with 1274 additions and 9 deletions

34
forestry/filing.lua Normal file
View File

@@ -0,0 +1,34 @@
_G.requireInjector(_ENV)
local Event = require('event')
local Util = require('util')
local chest = peripheral.wrap('top')
function getOpenChestSlot(stacks)
for i = 1, chest.getInventorySize() do
if not stacks[i] then
return i
end
end
end
Event.on('turtle_inventory', function()
for i = 1, 16 do
if turtle.getItemCount(i) > 0 then
chest.pullItem('down', i, 1)
os.sleep(.5)
local stacks = chest.getAllStacks(false)
local _,slot = Util.find(stacks, 'qty', 2)
if slot then
print('Duplicate')
chest.pushItem('north', slot, 1)
else
print('New Serum')
end
end
end
end)
Event.pullEvents()