//Detector
No edit summary |
No edit summary |
||
| Line 6: | Line 6: | ||
* 检测器可检测多条轨道。 | * 检测器可检测多条轨道。 | ||
可用检测器来检测某段长轨道上的某个列车。例如若轨道被占用,可用检测器来停止生成列车,或使列车驶入其他替代路线。 | |||
Revision as of 03:06, 28 December 2025
介绍
检测器与转辙器非常相似,两者的区别在于:
- 检测器不切换轨道。
- 检测器可检测多条轨道。
可用检测器来检测某段长轨道上的某个列车。例如若轨道被占用,可用检测器来停止生成列车,或使列车驶入其他替代路线。
语法
第一行支持两种写法:
- [train]检测整列列车
- [cart]单独检测列车中的某一辆矿车
第二行:detector<控制牌名称> detector用于声明控制牌类型,后面跟着的名称不是必须的。
Third line: Statement 1
Fourth line: Statement 2
If the third and fourth lines are kept empty, it will toggle the lever whenever it finds a train. A name can optionally be put after the word detector, to make sure two detector signs can only find each other.
Placement
Placement is rather difficult, since you need to use pairs of detector signs, one on both ends of the track to detect. The detector signs have to face each other, or they will have a hard time finding each other. Both signs are operated simultaneously, so you can use both ends to toggle a lever, using 4 statements in total. By adding multiple detector signs underneath one track you can expand the amount of statements.
Statements
On the third and fourth lines you can put the statements to evaluate.
