1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-11-18 08:10:38 +01:00

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.
This commit is contained in:
LeMagnesium 2015-02-24 12:06:40 +01:00
parent 2045a66dd6
commit e9d6ce8f90

View File

@ -632,6 +632,17 @@ minetest.register_node(":default:rail", {
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2}, 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}, 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", { minetest.register_node("carts:rail_copper", {