Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- net = peripheral.wrap("right")
- bridge = peripheral.wrap("left")
- local t = "appeng_me_tilecontroller_0"
- local function bytecalc(totalbytes, freebytes)
- aaa1 = totalbytes - freebytes
- aaa2 = aaa1 / totalbytes
- aaa3 = aaa2 * 100
- aaa3 = math.ceil(aaa3)
- return aaa3
- end
- local function typecalc(totaltypes, remainingtypes)
- ccc1 = totaltypes - remainingtypes
- ccc2 = ccc1 / totaltypes
- ccc3 = ccc2 * 100
- ccc3 = math.ceil(ccc3)
- return ccc3
- end
- while true do
- local m = peripheral.wrap("top")
- m.clear() -- clear monitor
- bridge.clear() -- clear OPglasses
- -- variables
- totalbytes = net.callRemote(t,"getTotalBytes")
- usedbytes = net.callRemote(t,"getUsedBytes")
- freebytes = net.callRemote(t,"getFreeBytes")
- remainingtypes = net.callRemote(t,"getRemainingItemTypes")
- totaltypes = net.callRemote(t,"getTotalItemTypes")
- usedtypes = net.callRemote(t,"getStoredItemTypes")
- --Monitor Stuff
- m.setCursorPos(2,1)
- m.setTextScale(1)
- m.write("ME Storage Status")
- m.setCursorPos(4,2)
- m.write(freebytes.." Bytes free of "..totalbytes.." Bytes")
- m.setCursorPos(4,3)
- m.write(remainingtypes.." ItemTypes free of "..totaltypes.." ItemTypes")
- --Monitor Stuff END
- background = bridge.addBox(0,315,110,25,0x000000,0.5)
- background.setZIndex(0)
- background2 = bridge.addBox(0,316,111,25,0x000000,0.5)
- background2.setZIndex(1)
- ae_t = "AE Storage"
- ae_text = bridge.addText(1,312,ae_t,0xFFFFFF)
- ae_text.setScale(0.7)
- ae_text.setZIndex(100)
- ae_text_shadow1 = bridge.addText(2,313,ae_t,0x000000)
- ae_text_shadow1.setScale(0.7)
- ae_text_shadow1.setZIndex(99)
- ae_text_shadow2 = bridge.addText(0,312,ae_t,0x000000)
- ae_text_shadow2.setScale(0.7)
- ae_text_shadow2.setZIndex(98)
- ae_text_shadow3 = bridge.addText(1,311,ae_t,0x000000)
- ae_text_shadow3.setScale(0.7)
- ae_text_shadow3.setZIndex(97)
- ae_text_shadow4 = bridge.addText(2,312,ae_t,0x000000)
- ae_text_shadow4.setScale(0.7)
- ae_text_shadow4.setZIndex(96)
- --Byte
- text1 = bridge.addText(4,323,freebytes.." Bytes free of "..totalbytes.." Bytes",0xFFFFFF)
- text1.setText(freebytes.." Bytes free of "..totalbytes.." Bytes")
- text1.setScale(0.5)
- box1 = bridge.addBox(2,321,102,7,0x000000,0.8)
- box2 = bridge.addBox(3,322,100,5,0xFFFFFF,0.2)
- box3 = bridge.addBox(3,322,bytecalc(totalbytes, freebytes),5,0x3399FF,0.8)
- --txtp1 = bridge.addText(107,322,bytecalc(totalbytes, freebytes).."%",0xFFFFFF)
- --Byte End
- --Type
- text2 = bridge.addText(4,332,remainingtypes.." ItemTypes free of "..totaltypes.." ItemTypes",0xFFFFFF)
- text2.setText(remainingtypes.." ItemTypes free of "..totaltypes.." ItemTypes")
- text2.setScale(0.5)
- box4 = bridge.addBox(2,330,102,7,0x000000,0.8)
- box5 = bridge.addBox(3,331,100,5,0xFFFFFF,0.2)
- box6 = bridge.addBox(3,331,typecalc(totaltypes, remainingtypes),5,0x3399FF,0.8)
- --txtp2 = bridge.addText(107,332,typecalc(totaltypes, remainingtypes).."%",0xFFFFFF)
- --Type End
- --FIX for layer issues...
- box1.setZIndex(1)
- box2.setZIndex(2)
- box3.setZIndex(3)
- box4.setZIndex(1)
- box5.setZIndex(2)
- box6.setZIndex(3)
- text1.setZIndex(100)
- text2.setZIndex(100)
- sleep(1.0)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement