Teleporter



The Teleporter is a travel mechanism purchased from the Steampunker for. When two Teleporters are wired together with a triggering mechanism, they can instantaneously exchange players, NPCs, or enemies between them. Teleporting is always instantaneous, has no load time or cooldown, and has no Mana or coin cost.

Unlike most furniture, Teleporters are foreground objects. They actually consist of three inseparable blocks which like all block types can be shaped with a hammer or actuated.

Usage
The two Teleporters must be placed on a surface of solid blocks or platforms and connected by Wire, along with a trigger mechanism, such as a Switch or Pressure Plate. When the trigger is activated, players, NPCs, or enemies (but not background Critters, items, or other entities) touching the 3x3 tile area above it are instantly transported to the other teleporter. A character standing a maximum of three tile heights above the Teleporter can still be transported, and burying a Teleporter two tiles deep can still transport players walking on the surface.

Teleporting is always two-way: when a connection is activated, both ends will exchange all players, NPCs, and enemies, that are at least partially occupying any square of 3x3 space above Teleporter pads. Players should keep this in mind when constructing Teleporter paths, as enemies could unintentionally be brought into a base, for example.

Limitations

 * Teleporters will not transport Worms, Bosses, other enemies that travel through blocks, Critters, liquids, item drops, Boulders, or placed furniture.
 * A Teleporter will not work when it is placed in front of natural Lihzahrd Brick Walls, if Plantera has not yet been defeated.

Working Mechanism
When a wire network (single color) with more than two teleporters is activated, the following algorithms determine which pair will activate：

Now：

 * Starting from the tile of the trigger mechanism, the length of wiring to each teleporter is measured (using a variant of Dijkstra's algorithm).
 * The teleporter closest to the source, in terms of total wiring route length, and the teleporter furthest away are each activated. (All other teleporters remain inactive, even if player is stood there.)
 * When wiring lengths are exactly the same, direction of wiring connection is considered (closest to furthest; first to last): down, up, right, left.
 * This allows selection of different destination pads on the same wire, by using different activations sources that each have different furthest pads. (Requires careful attention to wire lengths.)

Old version（before the 1.2.3 patch):

 * Start at the trigger mechanism which caused the wire to activate.
 * Explore the network one square at a time, moving to an adjacent unexplored wire if one is available, backtracking otherwise (in other words, perform a depth first search).
 * When there is a choice of adjacent wires to explore, move left as the first choice, then right, then up, then down.
 * Keep track of the order in which the teleporters on the network are first encountered (in other words, order them by preorder).


 * The first and last teleporter in this order will activate, and the rest will do nothing.

Both algorithms are deterministic, so a fixed wiring layout will always activate the same teleporters. The wiring layout can be chosen to target the desired teleporter.

Tips

 * A Pressure Plate can be placed directly on top of a Teleporter as the triggering mechanism, along with a short Wire connection, to allow activation by simply walking onto it.
 * If a Pressure Plate is placed to the left or right of the center and then alternated on the connecting Teleporter, the player can walk back and forth between locations without instantly triggering the destination plate.
 * Teleporters will also work if the player is riding a minecart, allowing discontiguous track systems to be connected easily (to get around an obstacle for example). The above two points still apply, though with Pressure Plate Tracks.
 * Teleporters can be used to create entrances into sealed bases. For Teleporters used with Pressure Plates to access safe zones, use Pressure Plate types that can only be activated by players (gray, brown, blue) to ensure that enemies can't inadvertently activate them and teleport inside.
 * Teleporters with Pressure Plate triggers are very useful in Boss Arenas, as they enable instantaneous dodging between remote locations. A player can jump between them continuously while firing Ranged or Magic Weapons.
 * Teleporting at night will cause NPCs that haven't moved into their assigned housing to instantly do so, which can be useful.
 * Setting a teleporter in front of your home will be useful if you don't want monsters to get inside during a Blood Moon or another event.

Trivia

 * The effect when activating a Teleporter resembles Magic Mirror use.
 * On the mobile and console version, Teleporters do not release grapples, unlike the PC version.
 * Teleporters can be used to place furniture mid-air that usually require a surface under them. Stack two teleporters, place the furniture on the upper teleporter, and then break the lower teleporter. The lower teleporter breaking will deconstruct the upper teleporter, but the furniture on top will not deconstruct. This can be handy for creative aesthetic building, such as placing things atop the column statue.

History
传送机