Guest User

simple.lib

a guest
Sep 5th, 2016
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.30 KB | None | 0 0
  1. simple = {}
  2.  
  3. -- Backing up _G
  4. simple.protected = _G
  5.  
  6. simple.print = simple.protected.print
  7. simple.run = simple.protected.dofile
  8.  
  9. simple.throwException = simple.protected.error
  10.  
  11. simple.iterator = {}
  12. simple.iterator.keyvalue = simple.protected.pairs
  13. simple.iterator.numerical = simple.protected.ipairs
  14.  
  15. simple.string = simple.protected.string
  16.  
  17. simple.net = {}
  18. simple.net.open = simple.protected.rednet.open
  19. simple.net.close = simple.protected.rednet.open
  20. simple.net.status = simple.protected.rednet,isOpen
  21. simple.net.send = simple.protected.rednet.send
  22. simple.net.sendAll = simple.protected.rednet.broadcast
  23. simple.net.standby = simple.protected.rednet.receive
  24. simple.dns = {}
  25. simple.dns.register = simple.protected.rednet.host
  26. simple.dns.unregister = simple.protected.rednet.unhost
  27. simple.dns.lookup = simple.protected.rednet.lookup
  28.  
  29. simple.convert = {}
  30. simple.convert.toNumber = simple.protected.tonumber
  31. simple.convert.toString = simple.protected.tostring
  32.  
  33. simple.event = {}
  34. simple.event.network = "rednet_message"
  35. simple.event.mouse = "mouse_click"
  36. simple.event.keyboard = "key"
  37. simple.event.modem = "modem_message"
  38.  
  39. simple.system = {}
  40. simple.system.handleEvent = simple.protected.os.pullEvent
  41. simple.system.shutdown = simple.protected.os.shutdown
  42. simple.system.reboot = simple.protected.os.reboot
  43. --simple.system.setPath = simple.protected.shell.setPath
  44.  
  45. simple.debug = {}
  46. simple.debug.rawset = simple.protected.rawset
  47. simple.debug.rawget = simple.protected.rawget
  48. simple.debug.protect = simple.protected.xpcall
  49. simple.debug.execute = simple.protected.assert
  50. simple.debug.callEvent = simple.protected.os.queueEvent
  51.  
  52. simple.import = simple.protected.os.loadAPI
  53.  
  54. --simple.path = simple.protected.shell.path
  55.  
  56. simple.fs = {}
  57. simple.fs.copy = simple.protected.fs.copy
  58. simple.fs.move = simple.protected.fs.move
  59. simple.fs.find = simple.protected.fs.find
  60. simple.fs.list = simple.protected.fs.list
  61. simple.fs.delete = simple.protected.fs.delete
  62. simple.fs.exists = simple.protected.fs.exists
  63. simple.fs.isDirectory = simple.protected.fs.isDir
  64.  
  65. simple.download = simple.protected.http.get
  66. simple.upload = simple.protected.http.post
  67.  
  68. simple.getRedstone = simple.protected.rs.getInput
  69. simple.setRedstone = simple.protected.rs.setOutput
  70.  
  71. simple.openForIO = simple.protected.fs.open
  72.  
  73. return simple
Add Comment
Please, Sign In to add comment