Demudduwi

fusion_top 0.1

Jun 10th, 2022 (edited)
785
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.04 KB | None | 0 0
  1. Altar = peripheral.wrap("top");
  2. rs.setAnalogOutput("bottom", 0)
  3.  
  4. while 0==0 do
  5.     local slot = Altar.getStackInSlot(1)  -- slot in altar
  6.     if slot then -- check slot in centre pedestal
  7.         rs.setAnalogOutput("bottom", 0) -- signal (pedestal in use) for bottom
  8.         print(slot.display_name)
  9.         check = 1
  10.  
  11.         while check == 1 do
  12.             if Altar.getStackInSlot(1) then -- check pedestal is filled
  13.                 if Altar.getStackInSlot(1).display_name..Altar.getStackInSlot(1).dmg ~= slot.display_name..slot.dmg then -- check if item changed
  14.                     check = 0
  15.                     print("ungleich")
  16.                     turtle.suckUp() -- clear pedestal
  17.                 end
  18.             else
  19.                 check = 0
  20.                 print("Pedestal unerwartet leer")
  21.             end
  22.             print("Item unveraendert")
  23.             sleep(2)
  24.         end
  25.     else
  26.         rs.setAnalogOutput("bottom", 15) -- signal (pedestal ready) for bottom
  27.         print("Pedestal leer")
  28.     end
  29.     sleep(5)
  30. end
Add Comment
Please, Sign In to add comment