Advertisement
Guest User

response

a guest
Jun 5th, 2019
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.02 KB | None | 0 0
  1. local component=require("component")
  2.  
  3. local rsinput=component.proxy("e3795eb8-753f-4530-8157-f2e692e11b21")
  4.  
  5. local rsinputfusion=component.proxy("7714c882-4651-4f01-a306-bb560c526c5e")
  6.  
  7. local rsoutput=component.proxy("a9ff500a-f372-4fca-99d0-496b74aa8e60")
  8.  
  9. local rssignal=component.proxy("5c07405d-6d34-457c-b3b0-82786ec47554")
  10.  
  11. local gpu=component.gpu
  12.  
  13. local text=require("text")
  14.  
  15. local term=require("term")
  16.  
  17. local computer=require("computer")
  18.  
  19. local os=require("os")
  20.  
  21. local sides=require("sides")
  22.  
  23. local firstmsg="Awaiting..."
  24.  
  25. --Code--
  26.  
  27. while true do
  28.  
  29. if rsinput.getInput(sides.top)==15 or rsinput.getInput(sides.top)==0 then
  30.  
  31.   while true do
  32.  
  33.   term.clear()
  34.   gpu.set(1,1,firstmsg)
  35.  
  36.     if rsinput.getInput(sides.top)==15 then --reactor 1 online
  37.  
  38.       rsoutput.setOutput(sides.right,15)
  39.  
  40.        term.clear()
  41.  
  42.          gpu.set(1,2,"Signal Received")
  43.  
  44.  
  45.    else if rsinput.getInput(sides.top)==0 then --reactor 1 offline
  46.  
  47.       rsoutput.setOutput(sides.right,0)
  48.  
  49.   end
  50.   end
  51.   end
  52.  
  53. else if rsinput.getInput(sides.back)==15 or rsinput.getInput(sides.back)==0 then
  54.  
  55.   while true do
  56.  
  57.     if rsinput.getInput(sides.back)==15 then --reactor 2 online
  58.  
  59.       rsoutput.setOutput(sides.front,15)
  60.  
  61.     else if rsinput.getInput(sides.back)==0 then --reactor 2 offline
  62.  
  63.       rsoutput.setOutput(sides.front,0)
  64.  
  65.   end
  66.   end
  67.   end
  68.  
  69. else if rsinput.getInput(sides.front)==15 or rsinput.getInput(sides.front)==0 then
  70.  
  71.   while true do
  72.  
  73.     if rsinput.getInput(sides.front)==15 then        -- reactor 3 online
  74.  
  75.       rsoutput.setOutput(sides.top,15)
  76.  
  77.    
  78.     else if rsinput.getInput(sides.front)==0 then      -- reactor 3 offline
  79.  
  80.       rsoutput.setOutput(sides.top,0)
  81.  
  82.   end
  83.   end
  84.   end
  85.  
  86. else if rsinput.getInput(sides.left)==15 or rsinput.getInput(sides.left)==0 then
  87.  
  88.   while true do
  89.  
  90.  
  91.       if rsinput.getInput(sides.left)==15 then            -- reactor 4 online
  92.  
  93.         rsoutput.setOutput(sides.left,15)
  94.  
  95.  
  96.       else if rsinput.getInput(sides.left)==0 then       -- reactor 4 offline
  97.  
  98.         rsoutput.setOutput(sides.left,0)
  99.    
  100.   end
  101.   end
  102.   end
  103. end
  104. end
  105. end
  106. end
  107. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement