1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-07-02 01:53:21 +00:00
CC-Tweaked/doc/stub/computer.lua
Jonathan Coates 9499654757
Add documentation for peripherals
No clue how we're going to do this for the dynamic peripheral system
if/when that ships, but this is a good first stage.

Like the Java APIs, this relies on stub files, so we can't link to the
implementation which is a bit of a shame. However, it's a good first
step.
2020-06-24 12:12:06 +01:00

28 lines
841 B
Lua

--- A computer or turtle wrapped as a peripheral.
--
-- This allows for basic interaction with adjacent computers. Computers wrapped
-- as peripherals will have the type `computer` while turtles will be `turtle`.
--
-- @module[kind=peripheral] computer
function turnOn() end --- Turn the other computer on.
function shutdown() end --- Shutdown the other computer.
function reboot() end --- Reboot or turn on the other computer.
--- Get the other computer's ID.
--
-- @treturn number The computer's ID.
-- @see os.getComputerID To get your computer ID.
function getID() end
--- Determine if the other computer is on.
--
-- @treturn boolean If the computer is on.
function isOn() end
--- Get the other computer's label.
--
-- @treturn string|nil The computer's label.
-- @see os.getComputerLabel To get your label.
function getLabel() end