Operating system for OpenComputers
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

22 satır
469B

  1. local lastkey = computer.uptime()
  2. local state = true
  3. local delay = 60
  4. while true do
  5. tEv = {coroutine.yield()}
  6. if tEv[1] == "key_down" then
  7. lastkey = computer.uptime()
  8. if not state then
  9. for addr in component.list("screen") do
  10. component.invoke(addr,"turnOn")
  11. end
  12. state = true
  13. end
  14. end
  15. if computer.uptime() > lastkey + delay and state then
  16. for addr in component.list("screen") do
  17. component.invoke(addr,"turnOff")
  18. end
  19. state = false
  20. end
  21. end