Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/java/org/cubexmc/metro/config/ConfigFacade.kt
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ class ConfigFacade(private val plugin: Metro) {
lineSymbol = plugin.config.getString("scoreboard.line_symbol", "❙") ?: "❙"

speedControlMode = plugin.config.getString("speed_control.mode", "VANILLA_MOMENTUM") ?: "VANILLA_MOMENTUM"
cruiseControlEnabled = plugin.config.getBoolean("speed_control.cruise_control.enabled", false)
cruiseControlEnabled = plugin.config.getBoolean("speed_control.cruise_control.enabled", true)
cruiseControlTargetSpeed = plugin.config.getDouble("speed_control.cruise_control.target_speed", -1.0)
cruiseControlIntervalTicks =
plugin.config.getLong("speed_control.cruise_control.interval_ticks", 2L).coerceAtLeast(1L)
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ speed_control:
# 控速模式: VANILLA_MOMENTUM (原版推力惯性) 或 BLOCK_BASED (根据铁轨下方方块实时控速)
# Speed control mode: VANILLA_MOMENTUM (Vanilla momentum) or BLOCK_BASED (Real-time speed control based on blocks below rails)
mode: VANILLA_MOMENTUM
# 巡航控速(实验性)
# 巡航控速
# max_speed / cart_speed 只是速度上限,不是目标速度:原版动力铁轨给矿车的
# 加速度与摩擦力平衡后约为 1.5 格/tick(约 30 格/秒),把上限调到 100 也不会
# 更快。开启巡航控速后,插件会在区间行驶中主动把车速维持在目标速度,
Expand All @@ -235,7 +235,7 @@ speed_control:
# target speed between stops, which is the only way past that plateau.
# Trade-off: derailing on curves becomes much more likely at high speed.
cruise_control:
enabled: false
enabled: true
# 目标速度(格/tick)。<= 0 表示使用线路 max_speed(未设置时用 settings.cart_speed)
# Target speed in blocks/tick. <= 0 uses the line max_speed, falling back to settings.cart_speed
target_speed: -1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ void bundledConfigUsesV2OnlyForDisplayWhitelist() {
assertEquals("<aqua><stop_name>", config.getString("titles.stop_continuous.title"));
assertEquals("<gold>☛ <bold>", config.getString("scoreboard.styles.current_stop"));
assertEquals("VANILLA_MOMENTUM", config.getString("speed_control.mode"));
assertTrue(config.getBoolean("speed_control.cruise_control.enabled"));
assertEquals("NOTE,18,1.0,PLING,0", config.getStringList("sounds.departure.notes").get(0));
assertFalse(config.contains("lines.name"), "data resources must not be folded into config migration");
}
Expand Down
Loading