Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cpt=require("component")
- term=require("term")
- nucleo=cpt.proxy(cpt.get("f7cf"))
- local function limpar()
- term.clear()
- term.setCursor(1,1)
- end
- local status="ligando"
- while true do
- local ener=nucleo.getEnergyStored()
- if status=="desligando" then
- limpar()
- print("Reator Desligado por Excesso de Energia")
- end
- if ener==10000000 then
- nucleo.setActive(false)
- local status="desligando"
- end
- term.pull(5)
- if ener<8000000 then
- local fissil=nucleo.getFuelAmount()
- local prod=nucleo.getEnergyProducedLastTick()
- local cons=nucleo.getFuelConsumedLastTick()
- if fissil==0 then
- limpar()
- print("Reacao Interrompida por Falta de Material Fissil")
- term.pull(2)
- else
- nucleo.setActive(true)
- local status="ligando"
- limpar()
- print("Reacao em Andamento")
- print("Energia Armazenada(RF): "..ener)
- print("Material Fissil Restante (mB): "..fissil)
- print("Producao Atual(RF/t): "..prod)
- print("Consumo de Material Fissil(mB/t): "..cons)
- term.pull(0.5)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement