Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- edit--Peripherals
- reactor = peripheral.wrap("back")
- monitor = peripheral.wrap("monitor_4")
- glowstone = peripheral.wrap("thermalexpansion_light_0","thermalexpansion_light_1")
- --Constant variables
- totalEnergy = 1000000
- totalFuelCapacity = reactor.getFuelAmountMax()
- --Now we are going to create the bar graph
- justWrite(1,1,"Reactor Program")
- resetFont()
- while true do
- currentFuel = reactor.getFuelAmount()
- currentEnergy = reactor.getEnergyStored()
- de = barGraphPreInit(currentEnergy,totalEnergy)
- RFProducedLastTick = math.floor(reactor.getEnergyProducedLastTick())
- FuelConsumedLastTick = math.floor(reactor.getFuelConsumedLastTick())
- barGraphInit("Energy Stored",1,2,currentEnergy)
- barGraphInit("Fuel Stored",1,3,currentFuel)
- barGraphInit("RF Produced",1,4,RFProducedLastTick)
- barGraphInit("Fuel Consumed",1,5,FuelConsumedLastTick)
- print(de)
- if de == 0 then
- glowstone.setColor(0x000000)
- elseif de == 1 then
- glowstone.setColor(0xbbf144)
- elseif de == 5 then
- glowstone.setColor(0xffff00)
- elseif de == 10 then
- glowstone.setColor(0xff0000)
- end
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement