summaryrefslogtreecommitdiff
path: root/inv_utils.lua
blob: 830e39ee258aa51f5ca8b56301e36b4a1a53f83b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
local function getEmptySlotInStorage(storage)
	return 5 -- TODO
end

local function swapSlotsInStorage(storage, slotA, slotB)
	local emptySlot = getEmptySlotInStorage(storage)
	storage.pushItems(peripheral.getName(storage), slotA, nil, emptySlot)
	storage.pushItems(peripheral.getName(storage), slotB, nil, slotA)
	storage.pushItems(peripheral.getName(storage), emptySlot, nil, slotB)
end


return { swapSlotsInStorage = swapSlotsInStorage }