From c5019b0470c2d82dab10d7d7b1fa22ca4894339e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20N=C3=BCcke?= Date: Tue, 10 Dec 2013 15:54:21 -0800 Subject: [PATCH] Updated API Computer (markdown) --- API-Computer.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/API-Computer.md b/API-Computer.md index b48c9bb..7a82084 100644 --- a/API-Computer.md +++ b/API-Computer.md @@ -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. - `computer.totalMemory(): number` 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` 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`