From f0ce172302a02c854a52bae449e6dd4c4287f949 Mon Sep 17 00:00:00 2001 From: cheapie Date: Sun, 21 Feb 2021 03:50:59 -0600 Subject: Split documentation from README out into separate files --- docs/button.txt | 6 +++ docs/camera.txt | 3 ++ docs/cardreader.txt | 8 ++++ docs/conductors.txt | 12 +++++ docs/controlpanel.txt | 2 + docs/detector.txt | 3 ++ docs/dimmable-light.txt | 2 + docs/expander.txt | 3 ++ docs/game-controller.txt | 9 ++++ docs/gpu.txt | 121 +++++++++++++++++++++++++++++++++++++++++++++++ docs/memory.txt | 7 +++ docs/movestone.txt | 16 +++++++ docs/nic.txt | 2 + docs/piston.txt | 7 +++ docs/timer.txt | 2 + docs/wallknob.txt | 5 ++ 16 files changed, 208 insertions(+) create mode 100644 docs/button.txt create mode 100644 docs/camera.txt create mode 100644 docs/cardreader.txt create mode 100644 docs/conductors.txt create mode 100644 docs/controlpanel.txt create mode 100644 docs/detector.txt create mode 100644 docs/dimmable-light.txt create mode 100644 docs/expander.txt create mode 100644 docs/game-controller.txt create mode 100644 docs/gpu.txt create mode 100644 docs/memory.txt create mode 100644 docs/movestone.txt create mode 100644 docs/nic.txt create mode 100644 docs/piston.txt create mode 100644 docs/timer.txt create mode 100644 docs/wallknob.txt (limited to 'docs') diff --git a/docs/button.txt b/docs/button.txt new file mode 100644 index 0000000..38cc340 --- /dev/null +++ b/docs/button.txt @@ -0,0 +1,6 @@ +How to use digilines buttons: +Connect to a digiline (or digimese), right-click, and set a channel and message. +When the button is pressed (right-click), it will send that message on that channel, over digilines. +If the "Protected" checkbox is checked, only players allowed to interact in the area can push the button. +If the "Manual Light Control" checkbox is checked, the light will not illuminate automatically when the button is pushed - use the "light_on" and "light_off" commands to control it. +Note that the settings cannot be changed after setting - you must dig and re-place the button to do so. diff --git a/docs/camera.txt b/docs/camera.txt new file mode 100644 index 0000000..7619c24 --- /dev/null +++ b/docs/camera.txt @@ -0,0 +1,3 @@ +How to use the camera: +Set the channel, distance, and radius. The camera will search for a node "distance" meters away and up to 10m down. +Every second while a player is within "radius" meters of that point, a table listing the players in range will be sent via digilines on the chosen channel. diff --git a/docs/cardreader.txt b/docs/cardreader.txt new file mode 100644 index 0000000..3450856 --- /dev/null +++ b/docs/cardreader.txt @@ -0,0 +1,8 @@ +How to use the card reader: +After setting a channel, swiping a card (punch the reader with the card to swipe) will send a message in the following format: + {event = "read",data = "The data that was on the card"} +To write a card, send a command in the following format: + {command = "write",data = "The data to put on the card",description = "A description of what the card is for"} +After sending the write command, swipe the card to be written and the reader will send back the following message: + {event = "write"} +Both blank and previously written cards can be written to. If the card was not blank, it will be overwritten. diff --git a/docs/conductors.txt b/docs/conductors.txt new file mode 100644 index 0000000..f086622 --- /dev/null +++ b/docs/conductors.txt @@ -0,0 +1,12 @@ +How to use digimese: +It conducts digilines signals (like digilines) in all directions (like mese). That's about it, really. + + +How to use vertical/insulated digilines: +These work exactly like the mesecons equivalents, that is: +Vertical digilines will automatically connect to other vertical digilines directly above or below them, and form "plates" on each end of the stack. Signals can only be conducted into or out of the stack at these "plates". +Insulated digilines conduct like regular digilines, but only into/out of the ends of the "wire" or at locations where an intermediate connection has been placed. + +How to use the junction box: +These are just plain digilines conductors (like digimese) but can skip over one node to another junction box or certain other nodes. +As in, [digiline][junction box][dirt][junction box][digiline] will work to transmit signals "through" the dirt. diff --git a/docs/controlpanel.txt b/docs/controlpanel.txt new file mode 100644 index 0000000..9966f7b --- /dev/null +++ b/docs/controlpanel.txt @@ -0,0 +1,2 @@ +How to use the digilines control panel: +Once a channel is set, any messages sent on that channel will be shown on the "LCD". The buttons, when pressed, send the messages "up", "down", "left", "right", "back", and "enter" on the same channel. If the panel is placed in a protected area (all standard protection mods are supported), only the owner of the area (and players with the protection_bypass privilege) can set the channel. There is also a "lock" function in the bottom-right of the "LCD" area. Click the padlock icon to lock/unlock it. If locked, only the owner of the area is allowed to use the buttons. If unlocked, anyone can use the buttons, although channel setting and (for reasons that shuld be obvious) locking/unlocking is still limited to the area owner and players with protection_bypass. diff --git a/docs/detector.txt b/docs/detector.txt new file mode 100644 index 0000000..7941093 --- /dev/null +++ b/docs/detector.txt @@ -0,0 +1,3 @@ +How to use the digilines player detector: +Set a channel and radius (radius must be a number >0 and <10 - anything invalid will be ignored and "6" used instead). +Every second while a player is within the radius, a table listing the players in range will be sent via digilines on the chosen channel. diff --git a/docs/dimmable-light.txt b/docs/dimmable-light.txt new file mode 100644 index 0000000..f721a48 --- /dev/null +++ b/docs/dimmable-light.txt @@ -0,0 +1,2 @@ +How to use the dimmable lights: +After setting the channel, send a number from 0 to 14 to set the light level. diff --git a/docs/expander.txt b/docs/expander.txt new file mode 100644 index 0000000..826fac1 --- /dev/null +++ b/docs/expander.txt @@ -0,0 +1,3 @@ +How to use the I/O expander: +After setting a channel, send a table (same format as a Luacontroller's "port" table) to set the output states. +A table in this same format will be sent back whenever an input changes or you manually poll it by sending a "GET" message. diff --git a/docs/game-controller.txt b/docs/game-controller.txt new file mode 100644 index 0000000..bd63dc8 --- /dev/null +++ b/docs/game-controller.txt @@ -0,0 +1,9 @@ +How to use the game controller: +After setting a channel, right-click the controller to start/stop using it. +While using a controller, it will send a table with the control inputs, pitch, yaw, look vector, and name of the player using the controller each time one of these values changes, up to 5 times per second. +When a player leaves a controller, the string "player_left" is sent. +In addition to right-clicking the controller in use to stop using it, the following will also cause a player to stop using the controller: +* The controller is moved or removed +* The player leaves the game +* The player is teleported away from the controller +* The controller receives the string "release" on its digilines channel diff --git a/docs/gpu.txt b/docs/gpu.txt new file mode 100644 index 0000000..98df39d --- /dev/null +++ b/docs/gpu.txt @@ -0,0 +1,121 @@ +Digilines 2D Graphics Processor +=============================== + +Commands for this part are in the form of a table, consisting of a field called "command" with the command to be executed, and other fields supplying parameters to the command. +Example: + {command="send",buffer=0,channel="example"} + +Up to 32 commands may be sent at once by placing all of the tables into one. +Example: + { + {command="createbuffer",buffer=0,xsize=16,ysize=16,color="aaaaaa"}, + {command="send",buffer=0,channel="example"} + } + + +Command: createbuffer +--------------------- + +Creates a new buffer. Up to 8 buffers may exist at one time, and each can be up to 64x64 pixels in size. + +Parameters: +buffer [integer 0-7]: The slot number to create the new buffer in. If the slot is already occupied, the existing contents will be erased. +xsize [integer 1-64]: The width of the new buffer in pixels. +ysize [integer 1-64]: The height of the new buffer in pixels. +color [hex color, default "000000"]: A color to fill the new buffer with. + +Command: send +------------- + +Sends the contents of a buffer to a digiscreen, rgblightstone panel, or other digilines device. + +Parameters: +buffer [integer 0-7]: The buffer to send the contents of. +channel [string]: The digilines channel to send the message on. + +Command: drawrect +----------------- + +Draws a rectangle with optional border on a buffer. + +Parameters: +buffer [integer 0-7]: The buffer to draw the rectangle on. +x1 [integer 1-64]: The X position of the left side of the rectangle. +x2 [integer 1-64]: The X position of the right side of the rectangle. +y1 [integer 1-64]: The Y position of the top side of the rectangle. +y2 [integer 1-64]: The Y position of the bottom side of the rectangle. +fill [hex color, default "000000"]: The color of the rectangle. +edge [hex color, default same as fill]: The color of the outside edge of the rectangle. + +Command: drawpoint +------------------ + +Draws a point on a buffer. +This command is intended for use when writing a single pixel at a time. +For writing large blocks at one time, it is recommended to use the "load" command instead. + +Parameters: +buffer [integer 0-7]: The buffer to draw the point on. +x [integer 1-64]: The X position of the point. +y [integer 1-64]: The Y position of the point. +color [hex color, default "000000"]: The color of the point. + +Command: copy +------------- + +Perform a BitBLT operation (such as copying one buffer to another). + +Parameters: +src [integer 0-7]: The buffer to copy from. +dst [integer 0-7]: The buffer to copy to. May be the same or different from "src". +srcx [integer 1-64]: The X position of the left side of the region to copy from. +srcy [integer 1-64]: The Y position of the top side of the region to copy from. +dstx [integer 1-64]: The X position of the left side of the region to copy to. +dsty [integer 1-64]: The Y position of the top side of the region to copy to. +xsize [integer 1-64]: The width of the region to copy. +ysize [integer 1-64]: The height of the region to copy. +mode [string from list below, default "normal"]: The blend mode to use for the copy operation. +transparent [hex color, default "000000"]: The color to treat as transparency when using the "overlay" blend mode. No effect in other modes. + +Blend modes: +normal: Copy the source to the destination, overwriting the destination. +nop: Do nothing. +overlay: Same as normal, but skip pixels in the source matching the "transparent" color. +add: For each subpixel (red, green, blue) add the source values to the destination and write the sum to the destination. +sub: For each subpixel (red, green, blue) subtract the source values from the destination and write the difference to the destination. +isub: For each subpixel (red, green, blue) subtract the destination values from the source and write the difference to the destination. +average: For each subpixel (red, green, blue) calculate the average of the source and destination and write the average to the destination. +and: Perform a bitwise AND of the source and destination and write the result to the destination. +or: Perform a bitwise OR of the source and destination and write the result to the destination. +nand: Perform a bitwise NAND of the source and destination and write the result to the destination. +nor: Perform a bitwise NOR of the source and destination and write the result to the destination. +xor: Perform a bitwise XOR of the source and destination and write the result to the destination. +xnor: Perform a bitwise XNOR of the source and destination and write the result to the destination. +not: Perform a bitwise NOT of the source and write the result to the destination. +rgbtohsv: Convert the source from the RGB color system to the HSV color system and write the result to the destination, storing hue as "red", saturation as "green", and value as "blue". +hsvtorgb: Convert the source from the HSV color system to the RGB color system, reading hue from the red channel, saturation from the green channel, and value from the blue channel, and write the result to the destination. + +Command: load +------------- + +Transfer a bitmap image into a buffer. +The width and height of the image will be automatically determined from the data given. + +Parameters: +buffer [integer 0-7]: The buffer to write the image into. +x [integer 1-64]: The X position of the left side of the image. +y [integer 1-64]: The Y position of the top side of the image. +data [2D array of hex color values, default for each is transparency]: The bitmap image to write. + +Command: text +------------- + +Draw one or more text characters on a buffer. +The font being used is 5*12 pixels in size, with one pixel spacing between characters. + +Parameters: +buffer [integer 0-7]: The buffer to draw the text on. +x [integer 1-64]: The X position of the left side of the text. +y [integer 1-64]: The Y position of the right side of the text. +color [hex color, default "ff6600"]: The color of the text. +text: The text string to draw. diff --git a/docs/memory.txt b/docs/memory.txt new file mode 100644 index 0000000..8463c20 --- /dev/null +++ b/docs/memory.txt @@ -0,0 +1,7 @@ +How to use the RAM and EEPROM chips: +First, set a channel. +Messages should consist of a table, with "command" set to either "read" or "write". "address" should be set to the number (0-31) of the 512-character block to read or write, and if writing then "data" should contain the data to write. +Example (to write - reading is similar, but with no data): + {command = "write",address = 7,data = "9a91a9e451b94dc262972557ab0d406f"} + +The RAM and EEPROM chips behave identically, except that the RAM chip loses its contents when dug whereas the EEPROM does not. diff --git a/docs/movestone.txt b/docs/movestone.txt new file mode 100644 index 0000000..977e9ed --- /dev/null +++ b/docs/movestone.txt @@ -0,0 +1,16 @@ +How to use the digilines movestone: +Commands for this node are in the form of a table, with the field "command" set to the desired action, and other fields providing parameters. +The commands are as follows: +* "getstate": Returns a table containing the following elements: "targetpos" (table representing the target position), "pos" (table representing the current position), and "moveaxis" (the current axis being moved along, nil if not moving) +* "absmove": Moves to the absolute position specified by "x" "y" and "z". No axis can move more than 50m as a result of one command. If movements along more than one axis are needed, they are processed in alphabetical order (X,Y,Z). +* "relmove": Same as absmove, but relative to the current position (for example, y=1 moves up 1m, not *to* Y=1) +The available parameters for absmove and relmove are: +* x: Target X position (for absmove) or target change in X position (for relmove) +* y: Same, but for Y +* z: Same, but for Z +* sticky: Whether to pull nodes along behind the movestone +* allsticky: Whether to pull a full stack of nodes like normal movestone (true) or just one like a sticky piston (false) +* maxstack: The maximum number of nodes to push/pull, with the movestone itself counting as 1. Cannot be set higher than 50. +* sound: "mesecons" to have the mesecons movestone sound play or "none" for no sound at all +If any of x/y/z are omitted, then they default to the current position (for absmove) or 0 (for relmove). +If any of maxstack/sticky/allsticky/sound are omitted, they default to the values last used. diff --git a/docs/nic.txt b/docs/nic.txt new file mode 100644 index 0000000..1bb9f7e --- /dev/null +++ b/docs/nic.txt @@ -0,0 +1,2 @@ +How to use the NIC: +Send a digilines signal with the URL you want to download. The HTTPRequestResult table will be sent back on the same channel. diff --git a/docs/piston.txt b/docs/piston.txt new file mode 100644 index 0000000..0ac9e22 --- /dev/null +++ b/docs/piston.txt @@ -0,0 +1,7 @@ +How to use the digilines pistons: +The following commands are accepted as strings: "extend" (extend the piston), "retract" (retract the piston), and "retract_sticky" (retract the piston, pulling one node like a sticky piston) +You can also send a command as a table. If so, the fields that can be used in the table are as follows: +* action: "extend" or "retract" +* max: The maximum number of nodes to push/pull, cannot be set higher than 16. Set to 0 (or omit) when retracting to perform a non-sticky retraction. +* allsticky: Pull a whole stack of nodes (like movestone), not just one. +* sound: The sound to make. "mesecons" for the mesecons piston sounds, "digilines" for the digilines piston sounds (default), or "none" for no sounds at all. diff --git a/docs/timer.txt b/docs/timer.txt new file mode 100644 index 0000000..70a380b --- /dev/null +++ b/docs/timer.txt @@ -0,0 +1,2 @@ +How to use the timer: +Send a number representing a time in seconds, from 0.5 to 3600. When the time expires, the timer will send "done" back on the same channel. If the loop feature is enabled (use the commands "loop_on" and "loop_off" to set this) the timer will automatically be set for the same time again each time it expires. diff --git a/docs/wallknob.txt b/docs/wallknob.txt new file mode 100644 index 0000000..0e64bb6 --- /dev/null +++ b/docs/wallknob.txt @@ -0,0 +1,5 @@ +How to use the wall knob: +Connect to a digiline, right-click, and set the channel and the minimum and maximum values. +Left-click to decrease the current setting or right-click to increase it. If the "protected" checkbox was checked, then only players allowed to interact in the area can do this. +Each time the setting is changed, the new setting is sent on the selected channel. +Note that the settings cannot be changed after setting - you must dig and re-place the knob to do so. -- cgit v1.2.3