Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- As written the computer is directly next to one of the stabilizers on the core (stabilizer on it's right side)
- -- a Red cage lamp is on the back (facing the stabilizer I mainly control)
- -- a green cage lamp is on the top
- -- a 3 tall, 7 wide monitor is below the computer (just regular monitors)
- local core = peripheral.wrap("right")
- local monitor = peripheral.wrap("bottom")
- term.redirect(monitor)
- while true do
- monitor.clear()
- -- find("particle_generator")
- local stabilizer = core.getReactorInfo()
- --for _, method in pairs(stabilizer) do
- --print(method)
- --end
- print(" status: "..stabilizer.status)
- print(" generationRate: "..stabilizer.generationRate.." RF/t")
- print(" temperature: "..stabilizer.temperature)
- print(" fieldStrength: "..stabilizer.fieldStrength)
- print(" maxFieldStrength: "..stabilizer.maxFieldStrength)
- print(" fieldDrainRate: "..stabilizer.fieldDrainRate)
- print("Fuel Conversion Rate: "..stabilizer.fuelConversionRate.." nb/t")
- print(" maxFuelConversion: "..stabilizer.maxFuelConversion)
- local fuelConversionPercent=stabilizer.fuelConversion*100/stabilizer.maxFuelConversion
- print(" fuelConversion: "..stabilizer.fuelConversion.."("..fuelConversionPercent.."%)")
- local energySaturationPercent=stabilizer.energySaturation*100/stabilizer.maxEnergySaturation
- print(" energySaturation: "..stabilizer.energySaturation.."("..energySaturationPercent.."%)")
- print(" maxEnergySaturation: "..stabilizer.maxEnergySaturation)
- local fieldStrengthPercent=stabilizer.fieldStrength*100/stabilizer.maxFieldStrength
- print(" fieldStrength%: "..fieldStrengthPercent)
- if (fieldStrengthPercent<51 or energySaturationPercent<51) then
- -- if it's < than some kill switch probably have it scram the reactor
- redstone.setOutput("back", not redstone.getOutput("back"))
- redstone.setOutput("top",false)
- end
- if (fieldStrengthPercent>51 and energySaturationPercent>51) then
- redstone.setOutput("back",false)
- redstone.setOutput("top",not redstone.getOutput("top"))
- end
- sleep(2)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement