Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local monSide = "top"
- local analyzerSide = "left"
- --SeedInfo
- Stufen = 10
- --
- m = peripheral.wrap(monSide)
- g = peripheral.wrap(analyzerSide)
- m.setBackgroundColor(colors.black)
- m.setTextScale(.5)
- local xMax,yMax = m.getSize()
- m.clear()
- g.analyze()
- local name = g.getSpecimen()
- local growth,gain,strength = g.getSpecimenStats()
- function Background(x1,y1,x2,y2,col)
- m.setBackgroundColor(col)
- for yP = y1,y2 do
- for xP = x1,x2 do
- m.setCursorPos(xP,yP)
- m.write(" ")
- end
- end
- end
- function overlay(xP,yP,txt)
- m.setCursorPos(xP,yP)
- m.write(txt)
- end
- function JoJa(xP,yP)
- m.setCursorPos(xP,yP)
- m.setBackgroundColor(colors.gray)
- m.setTextColor(colors.cyan)
- m.write("Jo")
- m.setTextColor(colors.orange)
- m.write("Ja ")
- m.setTextColor(colors.lightGray)
- m.write("Productions")
- end
- function graph(x1,y1,x2,y2,value,col1,col2)
- m.setBackgroundColor(col2)
- for yP = y1,y2 do
- for xP = x1,x2 do
- m.setCursorPos(xP,yP)
- m.write(" ")
- end
- end
- local Width = math.floor((x2-x1)*(value/Stufen))
- m.setBackgroundColor(col1)
- for yP = y1,y2 do
- for xP = x1,x1+Width do
- m.setCursorPos(xP,yP)
- m.write(" ")
- end
- end
- end
- function graph2(x1,x2,y1,value1,value2,value3,col)
- local cols = {colors.yellow,colors.lime,colors.green,colors.blue,colors.purple}
- local cursor = "->"
- for i = 1,Stufen/2 do
- for x = x1,x2 do
- m.setBackgroundColor(cols[i])
- m.setCursorPos(x,y1-i)
- m.write(" ")
- end
- end
- local v = math.floor((value1+value2+value3)/3)/2
- m.setCursorPos(x1-2,y1-v)
- m.setBackgroundColor(col)
- m.write(cursor)
- end
- graph (3,2,20,3,5,colors.lime,colors.gray)
- graph2(3,4,17,3,4,5,colors.black)
Advertisement
Add Comment
Please, Sign In to add comment