Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MonitorSide=detectDevice("monitor")
- if MonitorSide~="none" then
- monitor=peripheral.wrap(MonitorSide)
- print ("Monitor on the " .. MonitorSide .. " connected.")
- else
- for Index = 1, #peripheralList do
- if string.find(peripheralList[Index], "monitor") then
- monitor=peripheral.wrap(peripheralList[Index])
- print ("Monitor on wired modem: "..peripheralList[Index].." connected.")
- end
- end --for
- if monitor == "none" then
- print ("Warning - No Monitor attached, continuing without.")
- end
- end
- w,h=monitor.getSize()
- print(w)
- print(h)
- stockcount=1
- stocklist={}
- stockamount={}
- for i=1,#itemMapName do
- for j=1,#itemMapName[1] do
- stocklist[stockcount]=itemMapDisplay[i][j]
- stockamount[stockcount]=itemMapCount[i][j]
- stockcount=stockcount+1
- end
- end
- --------Sorter???
- monitor.clear()
- monitor.setTextColor(1)
- for i=1,math.min(h,math.floor(#stocklist/2)) do
- monitor.setCursorPos(1,i)
- monitor.write(stocklist[i].." "..stockamount[i])
- end
- if #stocklist>h then
- for i=1,h do
- monitor.setCursorPos(math.floor(w/2)+1,i)
- monitor.write(stocklist[i+h].." "..stockamount[i+h])
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement