Skip to content

Commit

Permalink
Added text to index.md, added lua.md and openOS.md, fixed up formatti…
Browse files Browse the repository at this point in the history
…ng, etc
  • Loading branch information
rashdanml committed Apr 11, 2015
1 parent cc9883c commit cea8fc6
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 7 deletions.
12 changes: 12 additions & 0 deletions src/main/resources/assets/opencomputers/doc/en_US/general/lua.md
@@ -0,0 +1,12 @@
# Lua

The Lua [reference manual](http://www.lua.org/manual/5.2/manual.html) is a good place to get started with the basics of Lua and becoming familiar with the basic syntax and standard libraries. OpenComputers has very similar standard libraries, and omits certain libraries almost entirely (such as about 99% of the debug library).

Non-standard libraries will need to be *required* in order to use them in a script. For example:

`local component = require("component")`
`local rs = component.redstone`

This will allow you to call all of the functions provided by the [redstone](../item/redstoneCard1.md) component.

OpenComputers provides many custom libraries which can be used for many applications, from controlling and manipulating components attached to the [computer](computer.md), to reference APIs for colors and keyboard keycodes. Custom libraries can be used within a Lua script by using the `require()` function, as above. Some custom libraries require specific components to work, such as the Internet library requiring an [internet card](../item/internetCard.md).
@@ -0,0 +1,7 @@
# OpenOS

OpenOS is a basic operating system available in OpenComputers. It is required to boot up a [computer](computer.md) for the first time, and can be crafted by placing an empty [floppy disk](../item/floppy.md) and an OpenComputers manual inside a Crafting table.

Once crafted, the [floppy disk](../item/floppy.md) can be placed inside a [disk drive](../block/diskDrive.md) connected to a [computer](computer.md) system, which will allow the [computer](computer.md) to boot up OpenOS. Once booted, it is advisable to install OpenOS to an empty [hard drive](../item/hdd1.md), foregoing the need for a [floppy disk](../item/floppy.md) and to gain access to a read-write file system ([floppy disk](../item/floppy.md) are read-only). A tier 3 [computer case](../block/case3.md) does not require a [disk drive](../block/diskDrive.md), as it has a slot built in for the [floppy disk](../item/floppy.md). OpenOS can be installed by simply running *install*, and following the on-screen prompts to complete the installation. The [floppy disk](../item/floppy.md) may be removed once the system has been rebooted. OpenOS can be installed on all devices except [drones](../item/drone.md) and [microcontrollers](../block/microcontroller.md) (both of which require manually programming an [EEPROM](../item/eeprom.md) to provide functionality).

OpenOS has many built in functions, the most useful of them is the `lua` command, which opens up a Lua interpreter. This is a good testing space for trying out various commands, and experimenting with component API, before writing the commands into a .lua script. For more information on programming, refer to the [Lua Programming](lua.md) page. To run Lua scripts, simply type in the name of the file and hit enter (for example, script.lua can be run by typing the `script` command in the terminal).
34 changes: 27 additions & 7 deletions src/main/resources/assets/opencomputers/doc/en_US/index.md
@@ -1,12 +1,32 @@
# OpenComputers Manual

This will be the index, one glorious day...
OpenComputers is a mod that adds persistent, modular, and highly configurable [computers](general/computer.md), [servers](item/server1.md), [robots](block/robot.md), and [drones](item/drone.md). All devices can be programmed using Lua 5.2, allowing for systems with varying complexity depending on the usage.

For now, [here is an example page](general/example.md).
Persistence ensures that a running [computer](general/computer.md) retains its state when the chunk it is in is unloaded. This means that if the player moves away from the [computer](general/computer.md), or logs off, the [computer](general/computer.md) will remember its last known state and continue from that point on when the player goes near the [computer](general/computer.md). Persistence works for all devices except for [tablets](item/tablet.md).

## General Information
[Computers](general/computer.md)
All devices are modular and can be assembled with a wide range of components, just like [computers](general/computer.md) in real life. Players who enjoy tinkering will be able to optimize devices to their heart's content. If desired, devices can be [dismantled](block/disassembler.md) and rebuilt if the initial configuration wasn't satisfactory. For [computers](general/computer.md) and [servers](item/server1.md), components can be swapped out on-the-fly simply by opening the corresponding GUI.

## Blocks and Items
[Items](item/index.md)
[Blocks](block/index.md)
OpenComputers devices are compatible with many different mods for manipulation of blocks and entities (through the [adapter](block/adapter.md), or specific upgrades in a [robot](block/robot.md) or [drone](item/drone.md)), or as a source of power.

Most devices are able to run a basic Operating System called [OpenOS](general/openOS.md) (with the exception of drones and microcontrollers). OpenComputers allows for creation of custom OSes and Architectures, should the player desire it.

Devices have access to various resources such as [disk space](item/hdd1.md) and [memory (RAM)](item/ram1.md). [Microcontrollers](block/microcontroller.md) are [computers](general/computer.md) with less functionality and components, and do not have an Operating System, requiring creative use of programming. [Robots](block/robot.md) are mobile [computers](general/computer.md) and are able to interact with blocks and entities (but are unable to interact with external OpenComputers components). [Drones](item/drone.md) are entity-based [robots](block/robot.md) with limited functionality, able to move differently and are able to interact differently with the world. [Servers](item/server1.md) are higher tier [computers](general/computer.md) and are able to hold more components, increasing the amount of resources available to control larger networks and run larger programs.

This manual contains detailed information regarding all blocks and items, how to set up different types of systems and devices, as well as an introduction to Lua programming.

## Table of Contents

### Devices
[Computers](general/computer.md)
[Servers](item/server1.md)
[Microcontrollers](block/microcontroller.md)
[Robots](block/robot.md)
[Drones](item/drone.md)

### Software and Programming
[OpenOS](general/openOS.md)
[Lua](general/lua.md)

### Blocks and Items
[Items](item/index.md)
[Blocks](block/index.md)

0 comments on commit cea8fc6

Please sign in to comment.