TheSommer

ManaManager

Nov 6th, 2020 (edited)
724
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.64 KB | None | 0 0
  1. ITEMCONDUIT_SINGLE_SIGNAL = 0.5
  2.  
  3. local function EmitTransferSignal(signals)
  4.   side = "back"
  5.   signalMulti = 1
  6.   redstone.setOutput(side, true)
  7.   sleep(ITEMCONDUIT_SINGLE_SIGNAL * signals)
  8.   redstone.setOutput(side, false)
  9. end
  10.  
  11. detectorHaltedCount = 0
  12.  
  13. while 1==1 do
  14.   if redstone.getInput("bottom") == false then
  15.     detectorHaltedCount = detectorHaltedCount + 1
  16.   else
  17.     detectorHaltedCount = 0
  18.   end
  19.   term.clear()
  20.   print("Detector Cycles since Signal: " .. detectorHaltedCount)
  21.  
  22.   if detectorHaltedCount >= 50 then
  23.     EmitTransferSignal(2)
  24.     print("Emitting Signal due to Flower Inactivity")
  25.   end
  26.  
  27.   sleep(0.1)
  28. end
Advertisement
Add Comment
Please, Sign In to add comment