Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bridge = peripheral.wrap("bottom")
- biomass = peripheral.wrap("drum_2")
- mobessence = peripheral.wrap("drum_1")
- lava = peripheral.wrap("drum_0")
- --honey = peripheral.wrap("drum_0")
- energyPrimary = peripheral.wrap("tile_thermalexpancion_cell_resonant_name_0")
- secundaryPrimary = peripheral.wrap("tile_thermalexpancion_cell_hardened_name_0")
- bridge.clear()
- term.clear()
- print("Equipamento Carregado!")
- sleep(0.5)
- print("Pre-carregamento do Programa!")
- function getTankInfo()
- lavaInfo = lava.getTankInfo()
- lavaName = lavaInfo[1]["contents"]["name"]
- lavaCapacity = lavaInfo[1]["capacity"]
- lavaAmount = lavaInfo[1]["contents"]["amount"]
- mobessenceInfo = mobessence.getTankInfo()
- mobessenceName = mobessenceInfo[1]["contents"]["name"]
- mobessenceCapacity = mobessenceInfo[1]["capacity"]
- mobessenceAmount = mobessenceInfo[1]["contents"]["amount"]
- biomassInfo = biomass.getTankInfo()
- biomassName = biomassInfo[1]["contents"]["name"]
- biomassCapacity = biomassInfo[1]["capacity"]
- biomassAmount = biomassInfo[1]["contents"]["amount"]
- --honeyInfo = honey.getTankInfo()
- --honeyName = honeyInfo[1]["contents"]["name"]
- --honeyCapacity = honeyInfo[1]["capacity"]
- --honeyAmount = honeyInfo[1]["contents"]["amount"]
- end
- getTankInfo()
- local cores = {}
- cores.red = 0xff3333
- cores.blue = 0x7dd2e4
- cores.yellow = 0xffff4d
- cores.green = 0x4dff4d
- cores.gray = 0xe0e0e0
- cores.preto = 0x000000
- function desenho()
- bridge.clear()
- local mainBox = caixa(20, 20, 145, 50, cores.gray, 0.5)
- local outlineT = caixa(18,18,150,2,cores.blue,0.5)
- local outlineB = caixa(18,70,150,2,cores.blue,0.5)
- bridge.sync()
- end
- function desenho1()
- bridge.clear()
- local mainBox = caixa(20, 20, 95, 50, cores.gray, 0.5)
- local outlineT = caixa(18,18,100,2,cores.blue,0.5)
- local outlineB = caixa(18,70,100,2,cores.blue,0.5)
- bridge.sync()
- end
- function menu()
- bridge.clear()
- desenho()
- sleep(1)
- texto(22, 22, "$$base = Info. Base", cores.red)
- texto(22, 32, "$$abelhas = Info. Abelhas", cores.red)
- bridge.sync()
- end
- function caixa(x, y, w, h, col, opa)
- bridge.addBox(x,y,w,h,col,opa)
- end
- function texto(x, y, text, col)
- bridge.addText(x,y,text,col)
- end
- function base()
- while true do
- event, command = os.pullEvent("chat_command")
- if command == "base" then
- repeat
- bridge.clear()
- desenho1()
- print(command)
- texto(22, 22, "MobEssence", cores.red)
- texto(22, 32, mobessenceAmount.."/"..mobessenceCapacity, cores.green)
- bridge.sync()
- sleep(2)
- until command ~= "base"
- end
- end
- end
- function music()
- while true do
- event, command = os.pullEvent("chat_command")
- if command == "music" then
- print(command)
- local jukebox = peripheral.wrap("auto_jukebox_0")
- jukebox.play()
- end
- end
- end
- function start()
- while true do
- event, command = os.pullEvent("chat_command")
- if command == "start" then
- print(command)
- bridge.clear()
- menu()
- end
- end
- end
- print("Dados Carregados")
- sleep(1)
- print("Programa Pronto")
- menu()
- parallel.waitForAny(music, start , base)
Add Comment
Please, Sign In to add comment