Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI("ocs/apis/sensor")
- mon = peripheral.wrap("back")
- sen = sensor.wrap("top")
- mon.setTextScale(0.75)
- x,y = mon.getSize()
- while true do
- mon.clear()
- mon.setCursorPos(1,1)
- mon.setTextColor(colors.cyan)
- for i=1,x do
- mon.write("-")
- end
- mon.setCursorPos(math.floor((x-20)/2),2)
- mon.setTextColor(colors.orange)
- mon.write("DSU - Inhaltsanzeige")
- mon.setCursorPos(math.floor((x-15)/2),3)
- mon.write("made by jamawie")
- mon.setTextColor(colors.cyan)
- mon.setCursorPos(1,4)
- for i=1,x do
- mon.write("-")
- end
- mon.setTextColor(colors.lightGray)
- targets = sen.getTargets()
- xPos = 5
- yPos = 8
- mon.setCursorPos(xPos,yPos-1)
- mon.write("X ,Y ,Z ")
- for k,v in pairs(targets) do
- if v.RawName == "powercrystals.factorydeepstorageunit" then
- details = sen.getTargetDetails(k)
- item = details.Slots[3].Name
- if yPos==y-1 then
- xPos = xPos + 25
- yPos = 8
- mon.setCursorPos(xPos,yPos-1)
- mon.write("X ,Y ,Z ")
- end
- mon.setCursorPos(xPos,yPos)
- if item == "" then
- mon.write(k .. ": " .. details.Slots[3].RawName)
- else
- mon.write(k .. ": " .. item)
- end
- yPos = yPos+1
- end
- end
- sleep(10)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement