Advertisement
AMONUWNA

uu matter module 1.2.5

Jul 26th, 2017
395
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.92 KB | None | 0 0
  1.  
  2. --------Config----------------
  3. exit = 63       --ile itemow tworzy
  4. ------------------------------
  5.  
  6.  
  7. create = 0 --Ile juz wypordukowano
  8.  
  9. while true do
  10.     event = os.pullEvent("redstone")
  11.  
  12.     if rs.getInput("left") and rs.getInput("back") == false then
  13.         -- Pobieranie uu mater
  14.         rs.setOutput("front", true)
  15.         os.sleep(0.5)
  16.         rs.setOutput("front", false)
  17.  
  18.         --Uruchamianie maszyn
  19.         rs.setOutput("back", true)
  20.     end
  21.    
  22.     --Odbieranie skonczonych itemow
  23.     if rs.getInput("bottom", true) then
  24.         create = create + 1;
  25.     end
  26.  
  27.     --Koniec produkcji
  28.     if create == exit then
  29.         --Wylanczanie maszyn
  30.         rs.setOutput("back", false)
  31.         --Przekazanie wiadomosci o koncu pracy do nastempnego modulu
  32.         rs.setOutput("right", true)
  33.         os.sleep(0.5)
  34.         rs.setOutput("right", false)
  35.        
  36.         -- Restart bramki
  37.         rs.setOutput("top", true)
  38.         os.sleep(0.5)
  39.         rs.setOutput("top", false)
  40.        
  41.         --Restet wyprodukowanych itemow
  42.         create = 0
  43.     end
  44. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement