From f728c4d246854001462b391aa6d9c18b2946f490 Mon Sep 17 00:00:00 2001 From: loosewheel <76670709+loosewheel@users.noreply.github.com> Date: Sun, 21 Nov 2021 02:10:31 +1000 Subject: [PATCH] Add files via upload --- docs/api.txt | 6 ++++- docs/conduit.txt | 66 ++++++++++++++++++++++++++++++++++++++++++++++ docs/detector.txt | 6 +++++ docs/dispenser.txt | 6 +---- 4 files changed, 78 insertions(+), 6 deletions(-) create mode 100644 docs/conduit.txt diff --git a/docs/api.txt b/docs/api.txt index aba7333..252e947 100644 --- a/docs/api.txt +++ b/docs/api.txt @@ -13,7 +13,7 @@ lwcomponents.register_spawner (itemname, spawn_func) spawn_func: 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: 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. 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 nil. If this function returns nil for ObjectRef a second boolean value should be returned for whether to cancel the action. diff --git a/docs/conduit.txt b/docs/conduit.txt new file mode 100644 index 0000000..1b686e9 --- /dev/null +++ b/docs/conduit.txt @@ -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 " + 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 = "", + slot = , + item = "" +} + + 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. diff --git a/docs/detector.txt b/docs/detector.txt index 2ebae9a..a2064c0 100644 --- a/docs/detector.txt +++ b/docs/detector.txt @@ -59,8 +59,14 @@ Digilines messages 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", + detected = table +} + +The detected field is a list of detected items. Each entry is of the form: +{ type = "", -- will be "entity", "player", "drop" or "node" name = "", label = "