From e9d6ce8f90c60365a27410c132fa9a782d2c7921 Mon Sep 17 00:00:00 2001 From: LeMagnesium Date: Tue, 24 Feb 2015 12:06:40 +0100 Subject: [PATCH] Added statements for default:rail acceleration - default:rail , overriden but defined in carts mod are now able to be connected to mesecons systems and increase carts' speed as copper rails actually do. --- mods/carts/init.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/mods/carts/init.lua b/mods/carts/init.lua index 722325b7..08692cc2 100755 --- a/mods/carts/init.lua +++ b/mods/carts/init.lua @@ -632,6 +632,17 @@ minetest.register_node(":default:rail", { fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2}, }, groups = {bendy = 2, snappy = 1, dig_immediate = 2, rail = 1, connect_to_raillike = 1}, + mesecons = { + effector = { + action_off = function(pos, node) + minetest.get_meta(pos):set_string("cart_acceleration", "0.5") + end, + + action_on = function(pos, node) + minetest.get_meta(pos):set_string("cart_acceleration", "0") + end, + }, + }, }) minetest.register_node("carts:rail_copper", {