From 9bbe7f99da97743844d29d8148fe8c90196f51e0 Mon Sep 17 00:00:00 2001 From: paramat Date: Fri, 25 Nov 2016 02:04:12 +0000 Subject: [PATCH] Carts: Increase power rail acceleration to help climbs This is partly a workaround for a bug. Climbs with continuous power rails were failing often due to unexplained losses of speed leading to a reversal of direction. The lack of acceleration on climbs meant that lost speed was not regained. Keeping cart speed at maximum on climbs helps reduce the chance of reversals. This also allows players to slowly accelerate up to full speed on a climb without needing a horizontal run-up to reach full speed first. It may not be possible to build the horizontal sections needed, or, if players are replacing a previous carts mod their track constructions, bridges, tunnels etc. will often not have the horizontal sections needed. Players will also sometimes need to place and enter a cart on a slope and be able to climb. --- mods/carts/rails.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mods/carts/rails.lua b/mods/carts/rails.lua index f929e84e..5da4ac4d 100644 --- a/mods/carts/rails.lua +++ b/mods/carts/rails.lua @@ -20,6 +20,7 @@ minetest.register_craft({ minetest.register_alias("default:rail", "carts:rail") + carts:register_rail("carts:powerrail", { description = "Powered rail", tiles = { @@ -27,7 +28,7 @@ carts:register_rail("carts:powerrail", { "carts_rail_t_junction_pwr.png", "carts_rail_crossing_pwr.png" }, groups = carts:get_rail_groups(), -}, {acceleration = 4}) +}, {acceleration = 5}) minetest.register_craft({ output = "carts:powerrail 8", @@ -38,6 +39,7 @@ minetest.register_craft({ } }) + carts:register_rail("carts:brakerail", { description = "Brake rail", tiles = { @@ -47,7 +49,6 @@ carts:register_rail("carts:brakerail", { groups = carts:get_rail_groups(), }, {acceleration = -3}) - minetest.register_craft({ output = "carts:brakerail 8", recipe = { -- 2.25.1