Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require("component")
- local refinery = component.ie_refinery
- local diesel = refinery.getOutputTank()
- local fermenter = component.ie_fermenter
- local fermenter1 = component.proxy("3a154fa1-b18f-41de-bf75-4c112857b4fc")
- local squeezer1 = component.proxy("a75dc1f8-495e-4f1a-bf85-97979c269327")
- local fluids = refinery.getInputFluidTanks()
- local plantoil = fluids.input1.amount
- local ethanol = fluids.input2.amount
- if fermenter1.enableComputerControl(false) then
- fermenter1.enableComputerControl(true)
- end
- if squeezer1.enableComputerControl(false) then
- squeezer1.enableComputerControl(true)
- end
- if diesel >= 24000 then
- fermenter1.setEnabled(false)--[[ then
- squeezer1.setEnabled(false) then
- plantoil = ethanol]]
- end
- if plantoil < ethanol then
- fermenter1.setEnabled(false)
- end
- elseif plantoil == ethanol then
- if diesel < 24000 then fermenter1.setEnabled(true)
- end
- if ethanol < plantoil then
- squeezer1.setEnabled(false) then
- elseif ethanol == plantoil then
- if diesel < 24000 then squeezer1.setEnabled(true)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement