Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- NOTE: --
- -- EDIT THE ADRESS TO MAKE SURE ITS CORRECT!--
- component = require("component")
- sides = require("sides")
- rs = component.proxy(component.get("279c"))
- colors = require("colors")
- transposer1 = component.proxy(component.get("ccee")) -- Fluid
- tank = component.proxy(component.get("a8d7")) -- stats
- gpu = component.gpu
- term = require("term")
- keyboard = require("keyboard")
- Scolors = { black = 0x000000,
- white = 0xf8f8ff,
- blue = 0x0000ff,
- lightGray = 0xd9d9d9,
- red = 0xff0000,
- purple = 0x9b30ff,
- carrot = 0xffa500,
- magenta = 0xcd00cd,
- lightBlue = 0x87cefa,
- yellow = 0xffff00,
- lime = 0x32cd32,
- pink = 0xffc0cb,
- gray = 0x696969,
- brown = 0x8b4500,
- green = 0x006400,
- cyan = 0x008b8b,
- olive = 0x6b8e23,
- gold = 0x8b6914,
- orangered = 0xdb4e02,
- diamond = 0x0fa7c7,
- crimson = 0xaf002a,
- fuchsia = 0xfd3f92,
- folly = 0xff004f,
- frenchBlue = 0x0072bb,
- lilac = 0x86608e,
- flax = 0xeedc82,
- darkGray = 0x563c5c,
- englishGreen = 0x1b4d3e,
- eggplant = 0x614051,
- deepPink = 0xff1493,
- ruby = 0x843f5b,
- orange = 0xf5c71a,
- lemon = 0xffd300,
- darkBlue = 0x002e63,
- bitterLime = 0xbfff00 }
- function fluid()
- if transposer1.getTankLevel(sides.west) ~= (transposer1.getTankCapacity(sides.west) / 100 * 50) then
- transposer1.transferFluid(sides.east, sides.west, 200)
- else
- os.sleep(2)
- end
- end
- function laser()
- if tank.getPurity(sides.east) >= 0.70 and tank.getFluidAmount(sides.east) >= 6000 then
- if tank.getStrength(sides.east) < 0.40 and tank.getEfficiency(sides.east) < 0.40 then
- rs.setBundledOutput(sides.top, colors.red, 15)
- else
- rs.setBundledOutput(sides.top, colors.red, 0)
- end
- else
- rs.setBundledOutput(sides.top, colors.red, 0)
- return
- end
- end
- function draw_text(x, y, text, text_color, bg_color)
- if text_color == nil then text_color = Scolors.white end
- if bg_color == nil then bg_color = Scolors.black end
- gpu.setBackground(bg_color)
- gpu.setForeground(text_color)
- gpu.set(x,y,text)
- gpu.setBackground(Scolors.black)
- gpu.setForeground(Scolors.white)
- end
- function screen()
- temp = tank.getPurity(sides.east)
- purity = tonumber(string.format("%.f", 100*temp))
- draw_text(1,1,"Stats.......: ",Scolors.gold)
- draw_text(1,2,"Fluid Amount: ".. tank.getFluidAmount(sides.east).."mB",Scolors.crimson)
- draw_text(1,3,"Purity......: ".. purity .."%",Scolors.bitterLime)
- draw_text(1,4,"Effciency...: ".. tonumber(string.format("%.1f", (100*tank.getEfficiency(sides.east)))).."%",Scolors.frenchBlue)
- draw_text(1,5,"Strength....: ".. tonumber(string.format("%.1f", (100*tank.getStrength(sides.east)))).."%",Scolors.eggplant)
- return
- end
- gpu.setResolution(23,6)
- term.clear()
- while true do
- if keyboard.isKeyDown(keyboard.keys.w) and keyboard.isControlDown() then
- term.clear()
- gpu.setResolution(150,50)
- os.exit()
- end
- fluid()
- laser()
- screen()
- os.sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement