//Skip
Jump to navigation
Jump to search
(Created page with "=== 过滤 === 在跳过牌的第二行,可以在任何经过/跳过控制牌的数量前面设置过滤。这可以让跳过操作忽略第二行指定的控制牌类型。过滤不区分大小写。例如,下面的跳过牌会跳过下一个车站,但忽略非车站的控制牌:") |
(Created page with "== 示例 ==") |
||
| Line 20: | Line 20: | ||
{{sign|[+train]|skip station 0 1|}} | {{sign|[+train]|skip station 0 1|}} | ||
== 示例 == | |||
= | |||
<div lang="en" dir="ltr" class="mw-content-ltr"> | <div lang="en" dir="ltr" class="mw-content-ltr"> | ||
[[File:Skip sign example.png|thumb|1220x1220px|Trains come from the left and first hit the powered ([+train]) skip sign. When the train does not have destination ''square_west'' set or ( ''<nowiki>|</nowiki>'' ) is empty, the skip sign is activated and skips the very next sign. In this case that's the station sign. As a result, trains not meant for this station will cross the station sign without being stopped for 5 seconds.]] | [[File:Skip sign example.png|thumb|1220x1220px|Trains come from the left and first hit the powered ([+train]) skip sign. When the train does not have destination ''square_west'' set or ( ''<nowiki>|</nowiki>'' ) is empty, the skip sign is activated and skips the very next sign. In this case that's the station sign. As a result, trains not meant for this station will cross the station sign without being stopped for 5 seconds.]] | ||
</div> | </div> | ||
Revision as of 19:26, 26 November 2025
介紹
跳過控制牌使用類似於轉轍器的語句來使列車跳過前方一個或多個控制牌。 例如某輛列車未設置目的地時,讓列車跳過站點。
語法
- 第一行:[train]或[cart]。當需要以每輛礦車為基礎跳過時,使用 [cart] 會比使用 [train] 更好。不過一般都使用 [train] 即可。與其他控制牌相同,需要紅石激活。你可以使用 [+train] 或 [+cart] 來讓跳過牌始終激活。
- 第二行:skip,若不添加其他參數,則會讓列車跳過下一個控制牌。若後只跟一個數值,則該數值表示列車在跳過前要經過的控制牌數量(經過多少個控制牌才執行跳過)。若跟兩個數值,則第二個數值表示要跳過的控制牌數量(要跳過多少個控制牌)。示例中,列車要經過兩個控制牌,在第三個控制牌選擇跳過。你還可以指定非數字符號過濾。
- 第三行和第四行:語句(默認使用「與邏輯」)決定何時激活跳過牌。可以將「|」寫在第二條語句的前面,這樣兩條語句將通過「或邏輯」連接在一起。若兩行留空,則跳過牌始終運作。
過濾
在跳過牌的第二行,可以在任何經過/跳過控制牌的數量前面設置過濾。這可以讓跳過操作忽略第二行指定的控制牌類型。過濾不區分大小寫。例如,下面的跳過牌會跳過下一個車站,但忽略非車站的控制牌:
示例
Trains come from the left and first hit the powered ([+train]) skip sign. When the train does not have destination square_west set or ( | ) is empty, the skip sign is activated and skips the very next sign. In this case that's the station sign. As a result, trains not meant for this station will cross the station sign without being stopped for 5 seconds.
