Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- component = require("component");
- reactor = component.br_reactor;
- con = 0;
- minCon = 0;
- hourCon = 0;
- maxPowerMin = 0;
- secInMin = 0;
- minInHour = 0;
- minConDis = 0;
- maxPowerDis = 0;
- addfuelP = 0;
- fuelPerRFAvg = 0;
- reactorStat = "OFFLINE";
- computerStatus = "idle";
- lastMessage = "System Online";
- os.execute("resolution 50 25");
- function getPowerConsumed()
- return 10000000 - reactor.getEnergyStored();
- end
- function fuelPerRf()
- return reactor.getFuelConsumedLastTick() / reactor.getEnergyProducedLastTick();
- end
- while true do
- con = math.floor(getPowerConsumed());
- minCon = minCon + con;
- addfuelP = addfuelP + fuelPerRf();
- if reactor.getActive() == true then reactorStat = "ONLINE";
- else reactorStat = "OFFLINE";
- end
- if con > maxPowerMin then
- maxPowerMin = con;
- end
- secInMin = secInMin + 1;
- if secInMin == 60 then
- minConDis = math.floor(minCon / 60);
- minCon = 0;
- secInMin = 0;
- maxPowerDis = maxPowerMin;
- maxPowerMin = 0;
- fuelPerRFAvg = addfuelP / 60;
- addfuelP = 0;
- end
- yelloriumIngot = fuelPerRFAvg / 144;
- yelloriumNeeded = (yelloriumIngot * minConDis) * 20;
- os.execute("clear");
- print("Reactor Status: " .. reactorStat);
- print("Reactor Control: " .. computerStatus);
- print("Last Message: " .. lastMessage);
- print("---------------------------------------");
- print("Power Consumed Per Second: " .. tostring(con));
- print("Power Consumed Per Minute: " .. tostring(minConDis));
- print("Maximum Power Consumed Per Minute: " ..tostring(maxPowerDis));
- print("---------------------------------------");
- print("Yellorium MB per Rf: " .. fuelPerRFAvg);
- print("Yellorium Ingots per Rf: " .. yelloriumIngot);
- print("Yellorium needed per second: " .. yelloriumNeeded);
- print("---------------------------------------");
- os.sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement