2021-11-06 21:47:07 +10:00
2021-11-06 21:46:50 +10:00
2021-11-06 21:46:50 +10:00
2021-11-06 21:46:50 +10:00
2021-11-06 21:46:50 +10:00
2021-11-06 21:46:50 +10:00
2021-11-06 21:46:50 +10:00
2021-11-06 21:46:50 +10:00
2021-11-06 21:46:50 +10:00
2021-11-06 21:46:50 +10:00
2021-11-06 21:46:50 +10:00
2021-11-06 21:46:50 +10:00
2021-11-06 21:46:50 +10:00
2021-11-06 21:46:50 +10:00
2021-11-06 21:46:50 +10:00
2021-11-06 21:46:50 +10:00
2021-11-06 21:46:50 +10:00
2021-11-06 21:46:50 +10:00

LWComponents
	by loosewheel


Licence
=======
Code licence:
LGPL 2.1

Media licence
CC BY-SA 3.0


Version
=======
0.1.0


Minetest Version
================
This mod was developed on version 5.4.0


Dependencies
============
default


Optional Dependencies
=====================
lwdrops
mesecons
digilines
unifieddyes
intllib


Installation
============
Copy the 'lwcomponents' folder to your mods folder.


Bug Report
==========



Description
===========
Various components for mesecons and digilines.



Dropper
-------
* This block is only available if digilines and/or mesecons are loaded.

Contains an inventory and drops an item on command. Also acts as a
digilines conductor.

UI

Channel - digilines channel of dropper.
Top 16 slot inventory - storage of items to drop.
Bottom 32 slot inventory - player's inventory.

Mesecons
	Drops the next item when power is turned on.

Digilines messages

"drop"
	Drops the next item. No drop if dropper is empty.

"drop <slot>"
	Drops 1 item from the given slot (1 to 16). No drop if slot is empty.
	eg. "drop 7"

"drop <itemname>"
	Drops 1 item of the given name. No drop if dropper does not contain the
	item.
	eg. "drop default:stone"

When an item is dropped a digilines message is sent with the dropper's
channel. The message is a table with the following keys:
{
	action = "drop",
	name = "<itemname>", -- name of dropped item
	slot = <slot> -- slot number the item was taken from (1 to 16).
}



Dispenser
---------
* This block is only available if digilines and/or mesecons are loaded.

Contains an inventory and dispenses (with velocity) an item on command.
Also acts as a digilines conductor.

UI

Channel - digilines channel of dispenser.
Top 16 slot inventory - storage of items to dispense.
Bottom 32 slot inventory - player's inventory.

Mesecons
	Dispenses the next item when power is turned on.

Digilines messages

"dispense"
	Dispenses the next item. No dispense if dispenser is empty.

"dispense <slot>"
	Dispenses 1 item from the given slot (1 to 16). No dispense if slot is
	empty.
	eg. "dispense 7"

"dispense <itemname>"
	Dispenses 1 item of the given name. No dispense if dispenser does not
	contain the item.
	eg. "dispense default:stone"

When an item is dropped a digilines message is sent with the dropper's
channel. The message is a table with the following keys:
{
	action = "dispense",
	name = "<itemname>", -- name of dropped item
	slot = <slot> -- slot number the item was taken from (1 to 16).
}



Collector
---------
* This block is only available if digilines is loaded.

Picks up dropped items in adjacent block, with optional filtering. Also
acts as a digilines conductor.

UI

Channel - digilines channel of collector.
Left 16 slot inventory - storage of picked up items.
Right 8 slot inventory - Filter list. Place what items should be picked
	up in this list. Leave empty to pick up all.
Bottom 32 slot inventory - player's inventory.

Digilines messages

"start"
	Start the collector.

"stop"
	Stop the collector.

When items are picked up a digilines message is sent with the collector's
channel. The message is a table with the following keys:
{
	action = "collect",
	name = "<itemname>", -- name of picked up items.
	count = <count> -- number of the item picked up.
}



Detector
--------
* This block is only available if digilines and/or mesecons are loaded.

Detects items or entities within a given radius. Also acts as a
digilines conductor.

UI

Channel - digilines channel of detector.
Radius - block distance from detector to detect.
Entities - if checked detects entities.
Players - if checked detects players.
Drops - if checked detects drops.
Nodes - if checked detects nodes.

mode:
	All - detects to radius in all directions, including diagonal.
	Forward - detects to radius directly in front of the detector (one block high).
	Up - detects to radius directly above the detector (one block wide).
	Down - detects to radius directly below the detector (one block wide).

Mesecons
	Mesecons power is turned on when something is detected, and turned off
	when nothing is detected.

Digilines messages

"start"
	Start the detector.

"stop"
	Stop the detector.

"radius <n>"
	Set radius of the detector. <n> should be a number from 1 to 5, and is
	trimmed to this range.

"entities <true|false>"
	Set detection of entities on or off.

"players <true|false>"
	Set detection of players on or off.

"drops <true|false>"
	Set detection of drops on or off.

"nodes <true|false>"
	Set detection of nodes on or off.

"mode all"
"mode forward"
"mode up"
"mode down"
	Set the detector's mode.

When items or entities are detected a digilines message is sent with the
detector's channel. A message is sent for each found item/entity. The
message is a table with the following keys:
{
	action = "detect",
	type = "<type>", -- will be "entity", "player", "drop" or "node"
	name = "<name>",
	label = "<label>",
	pos = { x = n, y = n, z = n },
	count = <count>
}

type
	Will be "entity", "player", "drop" or "node".

name
	For "entity" the registered entity name.
	For "player" the player's name.
	For "drop" the registered item name.
	For "node" the registered item name.

label
	For "entity" the name tag text.
	For "player" the player's name.
	For "drop" the registered item name.
	For "node" the registered item name.

pos
	The relative position of the detected item/entity from the detector,
	facing the direction of the detector.
	+x = right
	-x = left
	+z = forward
	-z = behind
	+y = above
	-y = below

count
	The count of items for a "drop", or 1 for everything else.



DigiSwitch
----------
* This block is only available if both digilines and mesecons are loaded.

Digiswitches act as both a digilines message target and a digilines cable,
as well as a mesecons power source. They can be placed beside each other
to form a bank, horizontally or vertically.

Right click the digiswitch to give it a channel.

Mesecon power can be delivered at 6 sides of the digiswitch, the adjacent
4 in the (x, z), above and below. Around the connector on these sides are a
colored border indicating the side. The sides are named "red", "green",
"blue", "yellow", "white" and "black".

The digilines message sent to the digiswitch dictates the action, "on" or
"off". The action can be followed with the side to act upon, separated by
a space. eg. "on white". If a side is stated only that side is acted upon.
If the side is omitted (or is invalid) all 6 sides are acted upon. If the
side name "switch" is give the power is supplied the same as a mesecons
switch (all horizontal sides, one below, this height and one above).



MoveFloor
---------
* This block is only available if mesecons and mesecons_mvps is loaded.

The MoveFloor block responds to a mesecons power source in the 4 horizontal
directions. If the power source is one higher the MoveFloor moves up to
that height. If the power source is one lower the MoveFloor moves down to
that height. Powering an adjacent block has no effect. The power source
should be turned off before another move or the MoveFloor will oscillate.

Any horizontally adjoining MoveFloor acts as a single block (only one
needs to be powered).

The MoveFloor will move up to 3 blocks stacked on it.

If using a DigiSwitch as the power source use the side name "switch" or
the MoveFloor will not move.



Solid Color Conductors
----------------------
* These blocks are only defined if mesecons, digilines, and unifieddyes are
loaded.

Provides 2 blocks that can be colored the same as Solid Color Block (with
the air brush) and is both a mesecons and digilines conductor.

The Solid Color Conductor block conducts in the 'default' directions and
the Solid Color Horizontal Conductor only conducts horizontally.



The following are also defined as variants of the original mod item, if
the relevant mod is loaded.
+	lwcomponents:touchscreen - digistuff:touchscreen as full sized node.
+	lwcomponents:panel - digistuff:panel as full sized node.



------------------------------------------------------------------------
Description
Various components for mesecons and digilines.
Readme 2 MiB
Languages
Lua 100%