Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Config:
- reactorSide = "top"
- --Function:
- reactor = peripheral.wrap(reactorSide)
- soloCell = "reactorUraniumSimple"
- dualCell = "reactorUraniumDual"
- quadCell = "reactorUraniumQuad"
- slotCell = { }
- function searchCell()
- local reactorSize = reactor.getInventorySize()
- print(reactorSize)
- for slot = 1, reactorSize do
- local slotData = reactor.getStackInSlot(slot)
- if slotData ~= nil then
- for k,v in pairs(slotData) do
- name = slotData.name
- dmg = slotData.dmg
- end
- if name == dualCell or name == quadCell
- or name == soloCell then
- print(slot..": "..name)
- table.insert(slotCell, slot)
- sleep(1)
- print(slotCell)
- end
- if slotCell ~= nil then
- file = fs.open("log.txt","w")
- file.write(slotCell)
- file.close()
- end
- end
- end
- end
- --Prog:
- if not fs.exists("log.txt") then
- searchCell()
- for k,v in pairs(slotCell) do
- print(k..": "..tostring(v))
- sleep(1)
- end
- end
- sleep(5)
- shell.exit()
Advertisement
Add Comment
Please, Sign In to add comment