Add files via upload

This commit is contained in:
loosewheel
2021-11-21 02:10:31 +10:00
committed by GitHub
parent 92138ff625
commit f728c4d246
4 changed files with 78 additions and 6 deletions

View File

@@ -13,7 +13,7 @@ lwcomponents.register_spawner (itemname, spawn_func)
spawn_func: spawn_func:
The function to call to spawn the mob of the form - The function to call to spawn the mob of the form -
spawn_func (spawn_pos, itemstack, owner, spawner_pos, spawner_dir) spawn_func (spawn_pos, itemstack, owner, spawner_pos, spawner_dir, force)
spawn_pos: spawn_pos:
The position the entity should be spawned at. The position the entity should be spawned at.
@@ -32,6 +32,10 @@ lwcomponents.register_spawner (itemname, spawn_func)
A single unit vector of the direction the spawner block is facing. A single unit vector of the direction the spawner block is facing.
eg. { x = -1, y = 0, z = 0 } eg. { x = -1, y = 0, z = 0 }
force:
Recommended force (for velocity) of spawned entity.
Can use vector.multiply (spawner_dir, force).
This function should return the ObjectRef of the spawned entity or This function should return the ObjectRef of the spawned entity or
nil. If this function returns nil for ObjectRef a second boolean nil. If this function returns nil for ObjectRef a second boolean
value should be returned for whether to cancel the action. value should be returned for whether to cancel the action.

66
docs/conduit.txt Normal file
View File

@@ -0,0 +1,66 @@
Conduit
-------
* This block is only available if digilines and/or mesecons are loaded.
Conduits are connected in a circuit, and can move items from their
inventory to another conduit in the same circuit.
When a conduit node is placed it has a simple form that asks for a channel.
This channel is both the digilines' channel and the target id of this
conduit within the circuit. A conduit does not have to be given a name.
Most of them are just used to connect other conduits together.
Transfer of items takes 0.1 seconds per conduit node moved.
Also acts as a digilines conductor. If the hopper mod is loaded, will
take items from the top and sides, and release them from the bottom.
Only the owner can dig or access the form of the locked version.
UI
Channel - digilines channel/target id of circuit.
Target - target id/channel of circuit this circuit will transfer to.
Automatic - if checked transfers next item every second without command.
Top right 16 slot inventory - storage of items.
Bottom 32 slot inventory - player's inventory.
Mesecons
Transfers the next item when power is turned on to the target circuit.
Digilines messages
"target <id>"
Set the target of the conduit. id should be the channel of another
conduit on the same circiut. This takes a moment to take effect, so
delay any transfers.
"targets"
Conduit will send a digilines message with its own channel in the form:
{
action = "targets",
targets = { ... } -- list of string channels of all other conduits
-- with a channel on the same circuit.
}
"transfer"
Simple transfer. Transfers the next item in the inventory to the target
circuit (same as mesecons power).
table message
{
action = "transfer",
target = "<channel>",
slot = <number>,
item = "<itemname>"
}
If target is not given, the circuit's set target is used.
slot should be a number between 1 to 16. If the slot is empty nothing
is transferred.
item should be the registered item name. If the circuit's inventory
does not contain any nothing is transferred.
Only slot or item should be given. If both are given slot is used. If
neither are given the next item in the inventory is transferred.

View File

@@ -59,8 +59,14 @@ Digilines messages
When items or entities are detected a digilines message is sent with the 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 detector's channel. A message is sent for each found item/entity. The
message is a table with the following keys: message is a table with the following keys:
{ {
action = "detect", action = "detect",
detected = table
}
The detected field is a list of detected items. Each entry is of the form:
{
type = "<type>", -- will be "entity", "player", "drop" or "node" type = "<type>", -- will be "entity", "player", "drop" or "node"
name = "<name>", name = "<name>",
label = "<label>", label = "<label>",

View File

@@ -6,11 +6,7 @@ Contains an inventory and dispenses (with velocity) an item on command.
Also acts as a digilines conductor. If the hopper mod is loaded, will take Also acts as a digilines conductor. If the hopper mod is loaded, will take
items from the top and sides, and release them from the bottom. items from the top and sides, and release them from the bottom.
Dispensers support mobs mod if loaded and Spawn mobs setting is enabled. To spawn entities from dispensers include the lwcomponents_spawners mod.
Will spawn the entity from an 'egg' if possible, or the 'egg' is dispensed.
If a chicken egg is dispensed a 10% chance a chicken is dispensed instead.
If the spawned entity can be owned (or tamed) and the dispenser is owned
the owner of the dispenser is set as the owner of the entity.
Only the owner can dig or access the form of the locked version. Only the owner can dig or access the form of the locked version.