Updated API Computer (markdown)

Florian Nücke 2013-12-10 15:54:21 -08:00
parent 407a6328ae
commit c5019b0470

@ -10,6 +10,10 @@ This API mainly provides information about the computer a Lua state is running o
The amount of memory currently unused, in bytes. If this gets close to zero your computer will probably soon crash with an out of memory error. The amount of memory currently unused, in bytes. If this gets close to zero your computer will probably soon crash with an out of memory error.
- `computer.totalMemory(): number` - `computer.totalMemory(): number`
The total amount of memory installed in this computer, in bytes. The total amount of memory installed in this computer, in bytes.
- `computer.energy(): number`
The amount of energy currently available in the network the computer is in. For a robot this is the robot's own energy / fuel level.
- `computer.maxEnergy(): number`
The maximum amount of energy that can be stored in the network the computer is in. For a robot this is the size of the robot's internal buffer (what you see in the robot's GUI).
- `computer.isRobot(): boolean` - `computer.isRobot(): boolean`
Whether this computer is a robot or not. Mostly useful to allow failing early in some programs, such as the built-in `dig` program. Whether this computer is a robot or not. Mostly useful to allow failing early in some programs, such as the built-in `dig` program.
- `computer.uptime(): number` - `computer.uptime(): number`