BitNet Communication Tower - theoriginalbit/MoarPeripherals GitHub Wiki

BitNet Communication Tower
Type: bitnet_tower
ID No.: 3476 / 3477 / 3478 / 3479
Name: MoarPeripherals:blockAntenna / blockAntennaCell / blockAntennaMiniCell / blockAntennaController

The BitNet Communication Tower is a multi-block peripheral structure that serves as a long-range transmitter. It offers functions to send messages, and fires events in response to messages received. They cannot communicate ''directly'' with ComputerCraft Wireless Modems, but can still be used to extend networks which incorporate them.

Their range is 3000 blocks, or 2400 in stormy weather (versions prior to 1.4 the range was 1000 blocks, or 800 in stormy weather), and they require no separate chunk loaders due to serving that purpose themselves - these aspects are all configurable in moarperipherals.cfg. Sending of messages simulates a transmission time, taking 0.25 seconds to send a message across a 100m distance (rounded up) in versions prior to 1.4, and 0.15 seconds for the same distance in newer versions; taking an approximate total time of 4.5 seconds to send a message over 3000 blocks in the versions after 1.4. Two towers can communicate so long as they're chunk-loaded; the space between them need not be. Objects such as tables, numbers or strings may be sent and received, and in fact usage is quite similar to the regular modem API - though there's no concept of "channels". In the same manner that regular ComputerCraft modems provide no security, BitNet messages only incorporate whatever protection scripters code in themselves.

To interface with a tower, a computer/turtle must be placed alongside the Controller block at the base. Wired Modems can also be used in order to wrap the tower as a remote peripheral, but only if attached to its underside. Since MoarPeripherals 1.3 towers without an attached system automatically repeats messages it receives.

##Functions

Name Returns Description
transmit(object message) boolean success Sends a message that will be received by all other systems linked to towers within range. Accepts various data types, such as strings, numbers, and tables.
isTowerComplete() boolean tower usable Indicates whether the controller block as part of a complete and usable BitNet tower.

##Events

Type Parameter 1 Parameter 2 Parameter 3
bitnet_message Peripheral "side". Message content. Distance from the transmitting tower.

##Code Example Example repeater code can be found in the following paste:

pastebin get eaq0ucSi towerRepeat

It acts in much the same way as the regular repeat script, but supports BitNet Communication Towers in addition to modems.

##Recipes

Recipes

The tower itself is constructed by placing a "Controller" block at the base, twelve "Pole" blocks on top of that, a "Mini Cell" block (prior to 1.4 this was a "Modem Interface" block which offered no connectivity) on top of that, then finally two "Cell" blocks at the peak of the structure. When all 16 blocks are in place they'll change shape to form the completed BitNet Communication Tower. In order to aid with construction, versions after 1.4 allow you to climb down the BitNet tower's side (like a ladder), however you may not climb up them.

##Version History

Build Date Details
v1.4.0 11 October 2014 New BitNet Tower model, courtesy of Dog a.k.a HydrantHunter.BitNet Tower is now cheaper to construct.BitNet Tower no longer has Modem Interface, instead has Mini Cell.(1.7.10 only) BitNet Tower can be climbed down, preventing fall damage, it cannot however be climbed.BitNet Tower has a larger default range, and lower sending delay. Requires config to be deleted/updated on existing servers.
v1.3.0 8 October 2014 BitNet towers now automatically repeat messages if there is no computer attached to them.
v1.2.0 4 August 2014 Initial release.