ThatGamingGnome Posted May 22, 2013 Share Posted May 22, 2013 As the image suggests this is my automated combustion engine regulator. With the help of computercraft and opencc sensors this system will automatically turn off your combustion engines if they are going to explode. Check out the video for a bit more detailed explanation of what this is all about and how you can get this working on your Tekkit world! More pictures available at http://imgur.com/a/bCgVP Startup Program (http://pastebin.com/xq2dzKgs) shell.run("power") Power Program (http://pastebin.com/uSSLzH4n) os.unloadAPI("ocs/apis/sensor") os.loadAPI("ocs/apis/sensor") local prox = sensor.wrap("top") local targets = prox.getTargets() local running = true local water = 0 function engine() --Read data from sensor for k, v in pairs(targets) do --If there are any combustion engines we will read --their internal water tank data if ((v.Name) == "Combustion Engine") then local targetsDetail = prox.getTargetDetails(k) for key, value in pairs(targetsDetail.Tanks) do --We run through every tank checking the water water = (targetsDetail.Tanks.Amount) end end end --We compare if the water is greater than 1000 units --If it is not greater we turn off the engines if (water > 1000) then rs.setOutput("back", true) else rs.setOutput("back", false) sleep(3) end sleep(2) end while true do --This checks if the lever is on or off if rs.getInput("front") == true then rs.setOutput("back", false) else engine() end sleep(1) end Link to comment Share on other sites More sharing options...
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!Register a new account
Already have an account? Sign in here.Sign In Now