Difference between revisions of "TrainCarts/Signs/zh"

From BergerHealer Wiki
Jump to navigation Jump to search
(Created page with "控制牌同样可以设置仅对特定方向的列车进行操作。在第一行的[train]或者[cart]后加上一个半角冒号“:”,之后写入需要进行处理的...")
Line 20: Line 20:
 
此外,一个控制牌也可以在相应条件下激活红石信号,在控制牌下方的方块侧面放置一个拉杆即可。当相应的控制牌对其上的列车进行操作时(例如,列车在车站停靠),拉杆便会被激活,同时对红石线或者其它红石元器件供能。需要注意的是,在第一行的train或者cart之前加入一个"!"来让激活控制牌的输入红石信号反相并不会使相应控制牌的输出信号反相。
 
此外,一个控制牌也可以在相应条件下激活红石信号,在控制牌下方的方块侧面放置一个拉杆即可。当相应的控制牌对其上的列车进行操作时(例如,列车在车站停靠),拉杆便会被激活,同时对红石线或者其它红石元器件供能。需要注意的是,在第一行的train或者cart之前加入一个"!"来让激活控制牌的输入红石信号反相并不会使相应控制牌的输出信号反相。
  
<div lang="en" dir="ltr" class="mw-content-ltr">
+
控制牌同样可以设置仅对特定方向的列车进行操作。在第一行的[train]或者[cart]后加上一个半角冒号“:”,之后写入需要进行处理的列车方向[[Special:MyLanguage/TrainCarts/Signs/Direction|列车方向]]
You may further change what cart/train is targeted, by adding a colon (:) after either cart or train, followed by one or multiple [[Special:MyLanguage/TrainCarts/Signs/Direction|direction(s)]]. For example, ''[train:lr]'' on a switcher sign would activate a lever when a train enters from either the left or right direction and doesn't for the remaining ones.
+
<br>例如,一个switcher控制牌的第一行写入[train:lr]代表这个控制牌将对左或右方的来车进行操作,而不会对其余方向驶来的列车有任何效果。
</div>
 
  
 
<div lang="en" dir="ltr" class="mw-content-ltr">
 
<div lang="en" dir="ltr" class="mw-content-ltr">

Revision as of 18:51, 4 February 2021

Other languages:
English • ‎Español • ‎中文

TC插件主要采用附着在轨道下方或侧面的木牌(以下称为控制牌)作为控制端口来对轨道/列车进行操作。其功能类似于现实中的无源应答器。

语法以及效果

每一个控制牌的的基本语法是相同的,第一行永远是[train]或者[cart],二者的区别在于,train是对经过此控制牌的整列火车进行相关操作,cart是对单辆矿车进行操作。值得一提的是,并不是每一个控制牌都能在第一行写入[cart],对单独车辆操作。


红石

所有的控制牌都可以通过红石信号激活,同样也可以作为列车信息和红石信号的接口,根据列车属性激活红石信号。
有些控制牌需要您使用红石激活才能使用,常见的例子是车站(Station)控制牌和生成(Spawner)控制牌。为了给控制牌充能并实现功能,你需要在控制牌旁边放置红石信号源。信号源可以是激活的红石粉(不需要指向控制牌)、拉杆、按钮等。(可参照红石灯被激活的方式)
如果你想在不使用红石信号的情况下一直让控制牌处于激活状态,你可以在控制牌第一行的[train]/[cart]之前加一个"+"号,变成[+train]或者[+cart],这时,控制牌将忽略外界的红石信号输入。如果想让控制牌在没有红石信号的情况下属于激活状态,而被红石信号充能后去使能,则可以在第一行加一个"!",变成[!train]或者[!cart]。
需要注意的是,这两者可能都会改变控制牌本身输出红石信号的方式。请根据不同控制牌的功能以及实际情况灵活调整。具体用法请参阅本维基各控制牌的百科页面。

此外,一个控制牌也可以在相应条件下激活红石信号,在控制牌下方的方块侧面放置一个拉杆即可。当相应的控制牌对其上的列车进行操作时(例如,列车在车站停靠),拉杆便会被激活,同时对红石线或者其它红石元器件供能。需要注意的是,在第一行的train或者cart之前加入一个"!"来让激活控制牌的输入红石信号反相并不会使相应控制牌的输出信号反相。

控制牌同样可以设置仅对特定方向的列车进行操作。在第一行的[train]或者[cart]后加上一个半角冒号“:”,之后写入需要进行处理的列车方向列车方向
例如,一个switcher控制牌的第一行写入[train:lr]代表这个控制牌将对左或右方的来车进行操作,而不会对其余方向驶来的列车有任何效果。

Depending on the sign can you add further customisation to target specific carts/trains or to perform certain things based on conditions. Please check the sign's specific page to check if it allows such further customisation.


Remote Control

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.

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:

Signtemplate.png
[train Intercity*]
property
destination
interhome

the setblock sign works too!

You can use this to recall all your trains easily. If you use tags to navigate trains, you can also add a tag saying that the train should return. Remote control signs only respond to redstone changes.

Placement

Empty minecarts are blocked
Trains are switched left and right using a 1:1 counter

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.

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.

For most signs the sign direction influences what happens:

  • 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


Types

  • Animator - play an animation configured in the train's attachments
  • Announce - sends a message to players in the cart and/or train above
  • Blocker - blocks trains coming from a certain direction
  • Block Changer - change the block types displayed in a minecart
  • Crafter - crafts items inside the storage minecarts of a train using a nearby workbench
  • Destination - marks a destination for the path finding and sets the next destination for the train
  • Destroyer - destroy trains
  • Detector - detect trains on a set region of rails
  • Effect - plays a particle or sound effect at the minecart, train or sign
  • Ejector - eject trains (let passengers exit)
  • Elevator - teleports trains including passengers up and down to another elevator
  • Enter - lets nearby players and/or mobs enter the train
  • Flip - Lets you flip a cart 180 degrees
  • Launcher - launch or brake trains to start moving at a desired speed
  • Mutex - acts as a cuboid barrier in which only a single train is ever allowed to be
  • Property - set properties on the train such as tags, destinations and owners
  • Skip - skips execution of signs up ahead based on statements
  • Sound - plays a named sound effect
  • Spawner - spawn an entire train, cart types can be set
  • Station - stop and launch trains
  • Switcher - switch levers and rails based on properties on the train
  • Teleporter - teleport trains including passengers (requires MyWorlds)
  • Transfer - transfer items between trains and chests/furnaces/dispensers
  • Trigger - display train information and a countdown of the arrival time of trains on signs (requires SignLink)
  • Ticket - let passengers pay for a ride (requires Vault)
  • Waiter - waits the train until the track is clear of other trains

To-do

Add 'chunks' to signs to replace 'keepchunksloaded'.

Permissions

Each sign has a separate build permission. Below the permission nodes for the above sign types:

Sign Permission node Default
destructor train.build.destructor OP
ejector train.build.ejector OP
station train.build.station OP
property train.build.property OP
switcher train.build.switcher OP
transfer train.build.collector OP
train.build.depositor
teleport train.build.teleport OP
spawner train.build.spawner OP
trigger train.build.trigger OP
destination train.build.destination OP
waiter train.build.waiter OP
crafter train.build.crafter OP
elevator train.build.elevator OP