Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local mon = peripheral.wrap("left")
- mon.setBackgroundColour(colors.black)
- local reactor = peripheral.wrap("BigReactors-Reactor_3")
- local cell = peripheral.wrap("tile_thermalexpansion_cell_resonant_name_0")
- local fuelBarrel = peripheral.wrap("mcp_mobius_betterbarrel_2")
- local wasteBarrel = peripheral.wrap("mcp_mobius_betterbarrel_1")
- for i, v in ipairs(peripheral.getMethods("tile_thermalexpansion_cell_resonant_name_0")) do
- print(i..". "..v)
- end
- function comma_value(amount)
- local formatted = amount
- while true do
- formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2')
- if(k == 0) then
- break
- end
- end
- return formatted
- end
- while true do
- if(cell.getEnergyStored() < 30000000) then
- reactor.setActive(true)
- else
- if(cell.getEnergyStored() > 75000000) then
- reactor.setActive(false)
- end
- end
- mon.clear()
- mon.setCursorPos(1, 1)
- mon.write("Reactor: "..tostring(reactor.getActive()))
- mon.setCursorPos(1, 2)
- mon.write("Energy in reactor: "..tostring(comma_value(reactor.getEnergyStored())).."RF")
- mon.setCursorPos(1, 3)
- mon.write("Energy in cell: "..tostring(comma_value(cell.getEnergyStored())).."RF")
- -- mon.setCursorPos(1, 4)
- -- local barrelFuel = fuelBarrel.getStoredItems().qty
- -- local barrelWaste = wasteBarrel.getStoredItems().qty
- -- mon.write("Fuel in barrel: "..tostring(math.floor(barrelFuel / 64)).."*64 + "..tostring(barrelFuel % 64))
- -- mon.setCursorPos(1, 5)
- -- mon.write("Waste in barrel: "..tostring(math.floor(barrelWaste / 64)).."*64 + "..tostring(barrelWaste % 64))
- sleep(1.5)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement