mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-08-03 02:56:53 -04:00
Updated NonStandardLuaLibs (markdown)
parent
64691ec947
commit
9377537edc
@ -1,4 +1,4 @@
|
||||
Most of Lua's standard libraries are available, although some of them may only be available partially or as re-implementations, meaning behavior may differ slightly. Libraries that are not available are the `package` library and the `debug` library. Please see [the Lua 5.2 manual](http://www.lua.org/manual/5.2/manual.html#6) for documentation on the standard libraries.
|
||||
Most of Lua's standard libraries are available, although some of them may only be available partially or as re-implementations, meaning behavior may differ slightly. Please see [the Lua 5.2 manual](http://www.lua.org/manual/5.2/manual.html#6) for documentation on the standard libraries.
|
||||
|
||||
This page tries to list all *differences* to these standard libraries.
|
||||
|
||||
@ -17,6 +17,14 @@ The [original functions](http://www.lua.org/manual/5.2/manual.html#6.2) from the
|
||||
|
||||
Note that the `coroutine.resume` and `coroutine.yield` implementations exposed to user code are wrappers that take care of aborting code that does not yield after a certain time (see config), and to allow differentiating system yields from user yields (system yields "bubble", for example this is used for the shutdown command and component API calls). This should not be noticeable from user code, however. If it is, it should be considered a bug.
|
||||
|
||||
Modules
|
||||
-------
|
||||
The package module got a reimplementation for OpenComputers. It should operate the same as [the original](http://www.lua.org/manual/5.2/manual.html#6.3), but is lacking the following functions:
|
||||
- `package.config` is missing and not used.
|
||||
- `package.cpath` is missing and not used.
|
||||
- `package.loadlib` is not implemented
|
||||
|
||||
The latter two are missing because it is impossible to load C code in OpenComputers.
|
||||
String Manipulation
|
||||
-------------------
|
||||
The [original functions](http://www.lua.org/manual/5.2/manual.html#6.4) from the `string` library are available without alterations.
|
||||
@ -70,3 +78,7 @@ One additional function has been added:
|
||||
- `os.sleep(seconds: number)` which allows pausing a script for the specified amount of time. Note that signals will still be processed by event handlers while the sleep is active, i.e. you cannot pull signals that were accumulated during the sleep after it ended, since no signals will remain in the queue (or at least not all of them).
|
||||
|
||||
Some new functions that kind of fall into this category are available in [[the computer API|API/Computer]].
|
||||
|
||||
Debug
|
||||
-----
|
||||
Only `debug.traceback` is implemented.
|
Loading…
x
Reference in New Issue
Block a user