Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- steamreq = 0
- for add, proxy in pairs(turbines) do
- if proxy.getActive() then
- proxy.setFluidFlowRateMax(proxy.getFluidFlowRateMaxMax())
- proxy.setInductorEngaged(true)
- turbines[add].rpm = math.floor(proxy.getRotorSpeed())
- steamreq = steamreq + proxy.getFluidFlowRateMax()
- if steamreq ~= laststeam then
- steamchange = 1
- end
- end
- end
- for add, proxy in pairs(reactors) do
- if proxy.getActive() then
- if steamchange == 1 then
- proxy.setAllControlRodLevels(100 - (steamreq / proxy.getHotFluidAmountMax()) * 100)
- os.sleep(5)
- if proxy.getHotFluidProducedLastTick() < steamreq then
- for i = 0, (proxy.getNumberOfControlRods() - 1) do
- if proxy.getControlRodLevel(i) > 0 then
- proxy.setControlRodLevel(i, proxy.getControlRodLevel(i) - 1)
- os.sleep(1.5)
- if proxy.getHotFluidProducedLastTick() > steamreq then
- steamchange = 0
- <<here is where I want to break out, back to where it checks for steamchange == 1>>
- end
- end
- end
- elseif proxy.getHotFluidProducedLastTick() > steamreq then
- for i = 0, (proxy.getNumberOfControlRods() - 1) do
- if proxy.getControlRodLevel(i) < 100 then
- proxy.setControlRodLevel(i, proxy.getControlRodLevel(i) + 1)
- os.sleep(1.5)
- if proxy.getHotFluidProducedLastTick() < steamreq then
- steamchange = 0
- <<here is where I want to break out, back to where it checks for steamchange == 1>>
- end
- end
- end
- end
- end
- end
- end
- os.sleep(1)
- laststeam = steamreq
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement