Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- glass = peripheral.wrap("right")
- drum = peripheral.wrap("drum_0")
- con = {
- peripheral.wrap("draconic_storage_0"),
- peripheral.wrap("drum_0")
- }
- function addBox(x, y, length, width, color, opacity)
- glass.addBox(x,y,length,width,color,opacity)
- end
- function energyDisplay(x, y, color)
- local curE = con[1].getEnergyStored()
- local maxE = con[1].getMaxEnergyStored()
- energyT = glass.addText(5,5,"Energy Core: " ..curE .."/" ..maxE .." RF", 0xFF0000)
- energyT.setScale(3)
- end
- function fluidDisplay()
- local tankInfo = con[2].getTankInfo()
- local contents = tankInfo[1].contents
- local name = contents.rawName
- local maxF = "256000"
- addText(11,57,name,0xFF0000,1)
- end
- function addText(x,y,string,color,scale)
- text = glass.addText(x,y,string,color)
- text.setScale(scale)
- end
- function draw_line(x,y,length,width,color,opacity)
- addBox(x,y,length,width,color,opacity)
- end
- function start()
- while true do
- local tankInfo = con[2].getTankInfo()
- local contents = tankInfo[1].contents
- local amount = contents.amount
- samount = tostring(amount)
- scap = "256000"
- if samount == nil then
- samount = "0"
- end
- glass.clear()
- addBox(3,3,709,29,0x000000,0.8)
- addBox(3,35,130,190,0x000000,0.3)
- addText(7,40,"Fluid Levels",0xFF0000,2)
- energyDisplay(5,2, 0xFF0000)
- fluidDisplay()
- draw_line(11,67,110,9,0xFF9900,1)
- addText(37,67,samount .."/" ..scap, 0x000000,1)
- glass.sync()
- sleep(0.1)
- end
- end
- start()
Advertisement
Add Comment
Please, Sign In to add comment