Advertisement
Robear9992

Robot Status - OpenComputers

Apr 28th, 2018
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.33 KB | None | 0 0
  1. --os.execute("pastebin get -f 4ZnZ2iXE status.lua")
  2.  
  3. local status = {}
  4. status.__index = status;
  5.  
  6. status.current = ""
  7.  
  8. function status.set(value)
  9.     if value ~= status.current then
  10.         status.change(value)
  11.     end
  12. end
  13.  
  14. function status.change(value)
  15.     io.write(value.."\n")
  16.     status.current = value
  17. end
  18.  
  19. return status
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement