View difference between Paste ID: HAjZ8KhS and VNcn2m1M
SHOW: | | - or go back to the newest paste.
1
fuelStatus = "Off"
2-
  function close()
2+
dynamoStatus = "Off"
3-
    redstone.setOutput("right",false)
3+
redstone.setOutput("back",false)
4-
    redstone.setOutput("top",false)
4+
redstone.setOutput("top",false)
5-
    redstone.setOutput("back",false)
5+
6
  term.clear()
7
  term.setCursorPos(1,1)
8
  print("== Compression Dynamo System ==")
9-
  print("== Fuel Delivery System ==")
9+
  print("Commands listed below will toggle systems")
10-
  print("Type a specified number to select fuel type")
10+
  print("(1) - Fuel Delivery - " .. fuelStatus)
11-
  print("(1) - Gaseous Fuel")
11+
  print("(2) - Dynamo Status - " .. dynamoStatus)
12-
  print("(2) - Dense Fuel")
12+
13-
  print("(3) - Light Fuel")
13+
14-
  print("(off) - Close all valves")
14+
15
    if fuelStatus == "Off" then
16
      redstone.setOutput("back",true)
17
      fuelStatus = "On"
18-
    close()
18+
      texutils.slowPrint("Enabled fuel delivery system")
19-
    redstone.setOutput("right",true)
19+
      sleep(2)
20-
    texutils.slowPrint("Selected (1), Gaseous Fuel")
20+
    else
21
      redstone.setOutput("back",false)
22
      fuelStatus = "Off"
23-
    close()
23+
      textutils.slowPrint("Disabled fuel delivery system")
24-
    redstone.setOutput("top",true)
24+
      sleep(2)
25-
    texutils.slowPrint("Selected (2), Dense Fuel")
25+
    end
26
  elseif option == "2" then
27-
  elseif option == "3" then
27+
    if dynamoStatus == "Off" then
28-
    close()
28+
      redstone.setOutput("top",true)
29-
    redstone.setOutput("back",true)
29+
      dynamoStatus = "On"
30-
    texutils.slowPrint("Selected (3), Light Fuel")
30+
      textutils.slowPrint("Enabled all dynamos")
31
      sleep(2)
32-
  elseif option == "off" then
32+
    else
33-
    close()
33+
      redstone.setOutput("top",false)
34-
    texutils.slowPrint("Selected (off), closed all valves")
34+
      dynamoStatus = "Off"
35
      textutils.slowPrint("Enabled all dynamos")
36
      sleep(2)
37
    end
38
  else
39
    textutils.slowPrint("Unknown command")
40
    sleep(2)
41
  end
42
end