Punch cart if mesecon signal is received

This commit is contained in:
SmallJoker
2015-03-22 10:52:48 +01:00
parent df04aa2a4d
commit 159d4ec603
3 changed files with 48 additions and 20 deletions

View File

@ -73,7 +73,7 @@ minetest.register_node(":carts:powerrail", {
mesecons = {
effector = {
action_on = function(pos, node)
minetest.get_meta(pos):set_string("cart_acceleration", "0.5")
boost_cart:boost_rail(pos, 0.5)
end,
action_off = function(pos, node)
@ -117,7 +117,7 @@ minetest.register_node(":carts:brakerail", {
mesecons = {
effector = {
action_on = function(pos, node)
minetest.get_meta(pos):set_string("cart_acceleration", "-0.2")
boost_cart:boost_rail(pos, -0.2)
end,
action_off = function(pos, node)