mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-08-03 19:17:27 -04:00
Created APIs (markdown)
parent
f4ff2d3b8e
commit
882d1e6719
27
APIs.md
Normal file
27
APIs.md
Normal file
@ -0,0 +1,27 @@
|
||||
Standard Libraries
|
||||
------------------
|
||||
|
||||
First and foremost you should get familiar with the [Lua reference manual][lua-manual], if you are new to Lua. You will find most basic Lua functionality explained there, as well as a bunch of standard library functions.
|
||||
|
||||
OpenComputers makes an effort to largely emulate the standard library in areas that would usually interact with the host system - that being the I/O library. There are a few differences, which you can look up here: [[differences in the standard libraries|NonstandardLuaLibs]]. Most notably, the debug and package libraries are not available, and `load` only accepts text source files, no binary / pre-compiled Lua programs (for security reasons).
|
||||
|
||||
Custom Libraries
|
||||
----------------
|
||||
|
||||
The standard libraries aside, OpenComputers comes with a couple of additional, built-in libraries. Here is a list of all these libraries. Note that some of these may not be usable depending on your configuration (HTTP) and context (Robot library on computers), but they'll still be there.
|
||||
|
||||
- [[Colors|API/Colors]]: a global table that allows referencing standard Minecraft colors by name.
|
||||
- [[Component|API/Component]]: look-up and management of components attached to the computer.
|
||||
- [[Event|API/Event]]: a very rudimentary event system (intended for libraries) and filtered signal pulling.
|
||||
- [[FileSystem|API/FileSystem]: abstracted interaction with file system components.
|
||||
- [[HTTP|API/HTTP]]: a simple wrapper for HTTP requests.
|
||||
- [[Keyboard|API/Keyboard]]: a table of key codes by name and pressed key tracking.
|
||||
- [[Robot|API/Robot]]: abstracted access to robot actions.
|
||||
- [[Shell|API/Shell]]: working path tracking and program execution.
|
||||
- [[Sides|API/Sides]]: a global table that allows referencing sides by name.
|
||||
- [[Term|API/Term]]: provides a simple readline implementation and text output.
|
||||
- [[Text|API/Text]]: provides text utilities such as serialization and tab to space conversion.
|
||||
- [[Unicode|API/Unicode]]: provides Unicode aware implementations of some functions in the string library.
|
||||
|
||||
|
||||
[lua-manual]: http://www.lua.org/manual/5.2/manual.html#3.1
|
Loading…
x
Reference in New Issue
Block a user