Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- b = peripheral.wrap("right")
- me = peripheral.wrap("left")
- b.clear()
- icons = {
- {15,15,0,8,nil,nil},
- {15,30,0,-8,nil,nil},
- {15,45,0,8,nil,nil}
- }
- mtitle = "Terran Republic"
- for i = 1,#icons do
- icon = b.addIcon(icons[i][1],icons[i][2],"ThermalFoundation:material",140)
- icon.setObjectAnchor("middle","middle")
- icons[i][5] = icon
- text = b.addText(icons[i][1]+10,icons[i][2]-3,i,0x000000)
- icons[i][6] = text
- end
- function rotGears()
- for i = 1,#icons do
- crot = icons[i][3]
- crot = crot+icons[i][4]
- if crot > 360 then
- crot = crot-360
- end
- icons[i][3] = crot
- icons[i][5].setRotation(crot)
- end
- b.sync()
- end
- title = b.addText(0,5,mtitle,0xFF0000)
- title.setAlignment("middle","top")
- title.setScale(2)
- sub = b.addText(-1,6,mtitle,0x000000)
- sub.setAlignment("middle","top")
- sub.setScale(2)
- sub.setZ(-1)
- titlecont = b.addBox(0,0,200,30,0x878787,0.5)
- b.sync()
- --cog container
- cogcont = b.addBox(3,3,150,60,0x878787,0.5)
- cogcont.setZ(-100)
- cnt = 1
- while true do
- rotGears()
- if cnt == 20 then
- if me.getStoredPower() ~= 0 then
- icons[1][6].setColor(0x00FF00)
- icons[1][6].setText("ME System Online!")
- else
- icons[1][6].setColor(0xFF0000)
- icons[1][6].setText("ME System Offline!")
- end
- cnt = 1
- end
- cnt = cnt + 1
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement