mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-18 11:48:02 -04:00
more ingame help topics, closing #15 (for now)
This commit is contained in:
parent
48a41440c6
commit
0884a4590d
18
assets/opencomputers/lua/rom/usr/man/dig
Normal file
18
assets/opencomputers/lua/rom/usr/man/dig
Normal file
@ -0,0 +1,18 @@
|
||||
NAME
|
||||
dig - excavate an area
|
||||
|
||||
SYNOPSIS
|
||||
dig SIZE
|
||||
|
||||
DESCRIPTION
|
||||
Makes the robot it is run on excavate an area of the specified size. When the robot's inventory is full, it will return to its starting position and drop everything towards the direction originally behind it. So when placing a robot so that it faces away from a chest behind it, it will place everything it finds into that chest. The robot will continue digging down until it hits a block it cannot break (when given a diamond pickaxe usually bedrock).
|
||||
|
||||
Note that this program performs no energy checks, meaning robots that run out of energy will simply stop where they are, possibly down in the hole they've been digging.
|
||||
|
||||
OPTIONS
|
||||
-s
|
||||
shutdown the robot when done
|
||||
|
||||
EXAMPLES
|
||||
dig 3
|
||||
Excavates a 3 by 3 area.
|
19
assets/opencomputers/lua/rom/usr/man/edit
Normal file
19
assets/opencomputers/lua/rom/usr/man/edit
Normal file
@ -0,0 +1,19 @@
|
||||
NAME
|
||||
edit - primitive file editor
|
||||
|
||||
SYNOPSIS
|
||||
edit FILE
|
||||
|
||||
DESCRIPTION
|
||||
A very simple text file editor. To create new files with `edit`, open a file in a writable file system that doesn't exist and save.
|
||||
|
||||
OPTIONS
|
||||
-v
|
||||
view mode, opens file as read only
|
||||
|
||||
EXAMPLES
|
||||
edit /tmp/test.txt
|
||||
Opens the file `/tmp/test.txt` for editing. If it doesn't exists, it will be created upon saving.
|
||||
|
||||
edit /bin/ls.lua
|
||||
Opens the file `/bin/ls.lua`, which will be opened in read-only mode, assuming `/bin` is the default as provided by the read-only-memory.
|
12
assets/opencomputers/lua/rom/usr/man/lua
Normal file
12
assets/opencomputers/lua/rom/usr/man/lua
Normal file
@ -0,0 +1,12 @@
|
||||
NAME
|
||||
lua - a simple Lua interpreter
|
||||
|
||||
SYNOPSIS
|
||||
lua
|
||||
|
||||
DESCRIPTION
|
||||
Launches a command line that can be used to evaluate Lua statements and expressions. This can be very useful for testing out commands. Note that the interpreter will automatically try to resolve undefined globals using `require`, i.e. it will try to load a package with the specified name.
|
||||
|
||||
EXAMPLES
|
||||
lua
|
||||
Launches the Lua interpreter.
|
23
assets/opencomputers/lua/rom/usr/man/pastebin
Normal file
23
assets/opencomputers/lua/rom/usr/man/pastebin
Normal file
@ -0,0 +1,23 @@
|
||||
NAME
|
||||
pastebin - download and upload programs from and to pastebin
|
||||
|
||||
SYNOPSIS
|
||||
pastebin get PASTID FILE
|
||||
pastebin put FILE
|
||||
pastebin run PASTEID [ARGUMENT]...
|
||||
|
||||
DESCRIPTION
|
||||
The pastebin program allows downloading programs from pastebin, identified by their paste ID. I can also be used to upload programs to pastebin.
|
||||
|
||||
The pastebin program requires an internet card and internet access to be enabled in the mod's configuration.
|
||||
|
||||
OPTIONS
|
||||
-f
|
||||
do not prompt before overwriting
|
||||
|
||||
EXAMPLES
|
||||
pastebin get AbCdEfGh test
|
||||
Downloads the paste with ID `AbCdEfGh` and writes it to file `test`.
|
||||
|
||||
pastebin put prog.lua
|
||||
Uploads the program `prog.lua` to pastebin.
|
16
assets/opencomputers/lua/rom/usr/man/primary
Normal file
16
assets/opencomputers/lua/rom/usr/man/primary
Normal file
@ -0,0 +1,16 @@
|
||||
NAME
|
||||
primary - get or set primary components
|
||||
|
||||
SYNOPSIS
|
||||
primary TYPE
|
||||
primary TYPE ADDRESS
|
||||
|
||||
DESCRIPTION
|
||||
This program allows reading the address of the current primary component of the specified type. It also allows chaning the current primary component for a specified type by providing the (abbreviated) address of the new primary component.
|
||||
|
||||
EXAMPLES
|
||||
primary gpu
|
||||
Writes the address of the current primary GPU to the standard output.
|
||||
|
||||
primary gpu 24a
|
||||
Makes the GPU of which the address starts with `24a` the new primary GPU.
|
22
assets/opencomputers/lua/rom/usr/man/redstone
Normal file
22
assets/opencomputers/lua/rom/usr/man/redstone
Normal file
@ -0,0 +1,22 @@
|
||||
NAME
|
||||
redstone - access to redstone input and output
|
||||
|
||||
SYNOPSIS
|
||||
redstone SIDE
|
||||
redstone SIDE VALUE
|
||||
redstone SIDE -b COLOR
|
||||
redstone SIDE -b COLOR VALUE
|
||||
|
||||
DESCRIPTION
|
||||
This program allows manipulating redstone output of the computer via the shell, if it has a built-in redstone card or is connected to a redstone I/O block. It can also be used to just display the current in- and output. If another mod is installed that provides bundled redstone logic, such as RedLogic, MineFactory Reloaded (Rednet Cables) or Project: Red, it can also be used to interact with bundled signals by passing the `-b` flag.
|
||||
|
||||
OPTIONS
|
||||
-b
|
||||
interact with bundled signals
|
||||
|
||||
EXAMPLES
|
||||
redstone front
|
||||
Displays the simple in- and output on the front face of a computer with a redstone card.
|
||||
|
||||
redstone north -b lime 200
|
||||
Sets the bundled `lime` output of a redstone I/O block's northern side to 200.
|
34
assets/opencomputers/lua/rom/usr/man/sh
Normal file
34
assets/opencomputers/lua/rom/usr/man/sh
Normal file
@ -0,0 +1,34 @@
|
||||
NAME
|
||||
sh - command interpreter (shell)
|
||||
|
||||
SYNOPSIS
|
||||
sh
|
||||
|
||||
DESCRIPTION
|
||||
This is the basic, built-in standard shell of OpenOS. It provides very basic functionality compared to what real OS's shells can achieve, but does the job for getting started. To run a command, enter it and press enter. The first token in a command will usually be a program. Any additional parameters will be passed along to the program.
|
||||
|
||||
Arguments to programs can be quoted, to provide strings with multiple spaces in them, for example:
|
||||
echo "a b"
|
||||
will print the string `a b` to the screen.
|
||||
|
||||
|
||||
The OpenOS shell provides basic redirects and piping:
|
||||
cat f > f2
|
||||
copies the contents of file `f` to `f2`, for example.
|
||||
echo "this is a \"test\"" >> f2
|
||||
will append the string 'this is a "test"' to the file `f2`.
|
||||
|
||||
Redirects can be combined:
|
||||
cat < f >> f2
|
||||
will feed the contents of file `f` to cat, which will then output it (in append mode) to file `f2`.
|
||||
|
||||
Finally, pipes can be used to pass data between programs:
|
||||
ls | cat > f
|
||||
will enumerate the files and directories in the working directory, write them to its output stream, which is cat's input stream, which will in turn write the data to file `f`.
|
||||
|
||||
|
||||
The shell also supports aliases, which can be created using `alias` and removed using `unalias` (or using the `shell` API). For example, `dir` is a standard alias for `ls`.
|
||||
|
||||
EXAMPLES
|
||||
sh
|
||||
Starts a new shell.
|
16
assets/opencomputers/lua/rom/usr/man/useradd
Normal file
16
assets/opencomputers/lua/rom/usr/man/useradd
Normal file
@ -0,0 +1,16 @@
|
||||
NAME
|
||||
useradd - adds a player to the list of authorized users
|
||||
|
||||
SYNOPSIS
|
||||
useradd NAME
|
||||
|
||||
DESCRIPTION
|
||||
Adds a player to the list of users that can use the computer. To add a player, he has to be logged in when the command is run. Note that the names are case sensitive. Users can be removed again using `userdel`.
|
||||
|
||||
As long as the list of players registered on a computer is empty, the computer can be used by all players. Once there is at least one entry in the list of users, only the players in the list can use the computer. This includes modifying its inventory, performing keyboard and mouse input as well as breaking the computer block.
|
||||
|
||||
Computer ownership can be disabled in the configuration.
|
||||
|
||||
EXAMPLES
|
||||
useradd Steve
|
||||
Adds the player named `Steve` to the list of users.
|
12
assets/opencomputers/lua/rom/usr/man/userdel
Normal file
12
assets/opencomputers/lua/rom/usr/man/userdel
Normal file
@ -0,0 +1,12 @@
|
||||
NAME
|
||||
userdel - removes a player from the list of authorized users
|
||||
|
||||
SYNOPSIS
|
||||
userdel NAME
|
||||
|
||||
DESCRIPTION
|
||||
Removes a player from the list of users authorized to use this computer. See `useradd`.
|
||||
|
||||
EXAMPLES
|
||||
userdel Steve
|
||||
Removes the player named `Steve` from the userlist.
|
@ -114,7 +114,6 @@ object WirelessNetwork {
|
||||
val top = crossProduct(v, side)
|
||||
|
||||
// Accumulated obstructions and number of samples.
|
||||
//val delta = v.lengthVector
|
||||
var hardness = 0.0
|
||||
val samples = math.max(1, math.sqrt(gap).toInt)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user