Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- blacklist = {
- "modularforcefieldsystem:forcicium", -1,
- "thermalfoundation:material": 866
- }
- function isBlacklisted(name, damage)
- local matchFound
- for blacklisted_name, blacklisted_damage in ipairs(blacklist) do
- if name == blacklisted_name and (damage == -1 or damage == blacklisted_damage) then
- matchFound = true
- break
- end
- end
- return matchFound
- end
- function move(machine, side, slot)
- item = machine.list()[slot]
- if item ~= nil then
- if isBlacklisted(item.name, item.damage) then
- machine.pushItems(side[2], slot)
- end
- moved = machine.pushItems(side[1], slot)
- end
- end
- --Clean compressor output
- function main()
- print("Running Compressor")
- compressor = peripheral.wrap("xu2:tilemachinereceiver_0")
- move(compresor, {"right", "down"}, 2)
- move(compresor, {"right", "down"}, 3)
- end
- while true do
- main()
- end
- return {
- main = main
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement