[[Image:TrainCarts signs intro image.png|thumb|right|A first glance at the sign format]]
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
== 红石 ==
A sign is always structured the same way. The first line contains either '''cart''' or '''train''' depending on if you want to target each cart separately or the train as a whole. You can then optionally specify the way the sign responds to redstone and what direction the train must be coming from.
'''TrainCarts signs require Redstone power to function.''' This means signs will not do anything unless you put a redstone torch or other power signal next to it. If you want to use signs without adding redstone torches, you can make use of a special syntax on the first line, which is the same for [train] and [cart]. Generally you will want to use '''[+train]''' to make the sign function.
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
{| class="wikitable" style="margin:auto"
{| class="wikitable" style="margin:auto"
|+ TrainCarts Sign Power Modes
|+ TC 控制牌充能模式
|-
|-
! First Line !! Explanation
! 第一行 !! 释义
|-
|-
| [train] || The default mode. Sign only works when redstone power is provided
| [train] || 默认模式。当使用红石激活时才会工作。
|-
|-
| [+train] || Always on power mode. Signs works all the time regardless of whether redstone power is provided
| [+train] || 持续模式。控制牌会一直工作,无需红石激活。
|-
|-
| [!train] || Inverted power mode. Sign works all the time and turns off when redstone power is provided. Works the same as [+train] when no redstone torch is used.
Signs can output a redstone signal as well by attaching a '''lever''' to the same block the sign is also attached to. Only a few signs activate the lever, like the [[TrainCarts/Signs/Station|station]] sign that activates it when trains stop on top of the station.
By default signs only activate when the train ''sees'' the front or sides of the sign. This means you should place signs facing the direction of train movement. To override this behavior you can set these activation directions by adding a colon (:) followed by one or more [[Special:MyLanguage/TrainCarts/Signs/Direction|directions]]. If you want the sign to always respond, just use '''[train:*]'''.
For example, '''[-train:lr]''' on a switcher sign would activate a lever when a train enters from either the sign-relative left or right direction and doesn't for the remaining ones. It uses '''-train''' [[TrainCarts/Signs/Switcher#Syntax|so that it does not switch the track]].
A few sign systems support remote control: the ability to control trains by name. You then use the ''[train <name>]'' format, or the shorter alias ''[t <name>]''. Remotely controlled signs only respond to redstone changes, thus where you place them is not important. So far the property, destination, destroy, eject and setblock sign systems support remote control.
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
<div class="mw-translate-fuzzy">
Remote control can also affect multiple trains. Just like the tag system, remote control uses *-signs to identify the trains to affect. For example, the following remote control sign will set the destination to ''home'' for all intercity trains:
Each sign targets a certain track piece above. Signs attached to walls take the block they are attached to and look up until they find a piece of track. That track is then used for that sign. Sign posts look up until they find a piece of track. There may not be blocks without signs between the bottom sign and the tracks.
You can make a pillar of blocks below a single track piece and attach signs to it, to make a bundle of actions on a single track piece. Trains look down when they enter a new track piece to check for signs, so make sure you put the output signs above the signs that use this output for correct results.
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
使用 TC 的附加插件会有例外,因为附加插件可能会改变控制牌需要放置的(相对)位置,以便为轨道工作。例如,'''TC Hang Rail''' 会要求你是否将控制牌添加到 Hang 轨道的'''上方'''才能运作,而 '''TCC(TrainCarts Coasters)'''可使用节点来替代控制牌,且节点还可以随意移动到任何其他方块上。
A noticeable exception would be add-ons for the TrainCart plugin, which may change the (relative) position a sign would need to be placed on in order to work for the track. For example, would the ''TC Hang Rail'' add-on require you to add the signs '''above''' the Hang rail track to work, while the ''TCC'' (TrainCarts Coasters) add-on uses the block of a node for the sign, which can be moved to any other block.
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
对于大多数控制牌来说,控制牌的'''方向'''会影响事件,比如上文所述的'''激活方向''':
For most signs the sign '''direction''' influences what happens, as also discussed earlier (''Activation Direction''):
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
* 列车'''必须面对控制牌上的文字'''才能让控制牌作出反应。
* The train '''has to face the text on the sign''' to make the sign respond
* 与轨道对齐的控制牌(即牌子面向或背对轨道)'''始终'''会作出反应。
* Signs with the same alignment as the tracks (faces to or away from the tracks) '''always''' respond
* 列车会在控制牌面向的方向生成。
* The train is spawned in the direction the sign faces
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
== 类型 ==
==Types==
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
{| class="wikitable" style="margin:left"
*[[Special:MyLanguage/TrainCarts/Signs/Animate|Animate]] - play an animation configured in the train's attachments
! 控制牌类型 !! 描述 !! 是否支持远程控制
*[[Special:MyLanguage/TrainCarts/Signs/Announce|Announce]] - sends a message to players in the cart and/or train above
|-
*[[Special:MyLanguage/TrainCarts/Signs/Blocker|Blocker]] - blocks trains coming from a certain direction
*[[Special:MyLanguage/TrainCarts/Signs/Destination|Destination]] - marks a destination for the path finding and sets the next destination for the train
*[[Special:MyLanguage/TrainCarts/Signs/Launcher|Launcher]] - launch or brake trains to start moving at a desired speed
|-
*[[Special:MyLanguage/TrainCarts/Signs/Mutex|(Smart) Mutex]] - prevents train collisions at intersections by blocking multiple trains from entering the same area
*[[Special:MyLanguage/TrainCarts/Signs/Trigger|Trigger]] - display train information and a countdown of the arrival time of trains on signs (requires SignLink)
|-bgcolor="#dddddd"
*[[Special:MyLanguage/TrainCarts/Signs/Ticket|Ticket]] - let passengers pay for a ride (requires Vault)
Each sign has a separate build permission. [[TrainCarts/Permissions#Building_Action_Signs|See the main permissions page]]. For using remote control, the player requires the <code>train.build.feature.remotecontrol</code> permission which is OP-only by default.
使用 TC 的附加插件会有例外,因为附加插件可能会改变控制牌需要放置的(相对)位置,以便为轨道工作。例如,TC Hang Rail 会要求你是否将控制牌添加到 Hang 轨道的上方才能运作,而 TCC(TrainCarts Coasters)可使用节点来替代控制牌,且节点还可以随意移动到任何其他方块上。